class_docstr: Abstract decoder class.
  
  Implementations must define the following abstract methods:
     -`build`
     -`reconstruction_loss`
     -`sample`
class_docstr_tok: ["Abstract","decoder","class",".","Implementations","must","define","the","following","abstract","methods",":","-","`","build","`","-","`","reconstruction_loss","`","-","`","sample","`"]
docstr: Sample from decoder with an optional conditional latent vector `z`.
  
  Args:
    n: Scalar number of samples to return.
    max_length: (Optional) Scalar maximum sample length to return. Required if
      data representation does not include end tokens.
    z: (Optional) Latent vectors to sample from. Required if model is
      conditional. Sized `[n, z_size]`.
    c_input: (Optional) Control sequence, sized `[max_length, control_depth]`.
  
  Returns:
    samples: Sampled sequences. Sized `[n, max_length, output_depth]`.
docstr_tok: ["Sample","from","decoder","with","an","optional","conditional","latent","vector","`","z","`",".","Args",":","n",":","Scalar","number","of","samples","to","return",".","max_length",":","(","Optional",")","Scalar","maximum","sample","length","to","return",".","Required","if","data","representation","does","not","include","end","tokens",".","z",":","(","Optional",")","Latent","vectors","to","sample","from",".","Required","if","model","is","conditional",".","Sized","`","[","n",",","z_size","]","`",".","c_input",":","(","Optional",")","Control","sequence",",","sized","`","[","max_length",",","control_depth","]","`",".","Returns",":","samples",":","Sampled","sequences",".","Sized","`","[","n",",","max_length",",","output_depth","]","`","."]
code: def sample(self, n, max_length=None, z=None, c_input=None):
      """Sample from decoder with an optional conditional latent vector `z`.
  
      Args:
        n: Scalar number of samples to return.
        max_length: (Optional) Scalar maximum sample length to return. Required if
          data representation does not include end tokens.
        z: (Optional) Latent vectors to sample from. Required if model is
          conditional. Sized `[n, z_size]`.
        c_input: (Optional) Control sequence, sized `[max_length, control_depth]`.
  
      Returns:
        samples: Sampled sequences. Sized `[n, max_length, output_depth]`.
      """
      pass
  
imports: import abc
  from magenta.contrib import training
  import tensorflow.compat.v1
  import tensorflow_probability
  import tf_slim
label_desc: Use image node_id 3 for calling the BaseDecoder obj's underlying member method code with example usage: obj.sample(n, max_length, z, c_input) without return types