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: Reconstruction loss calculation.
  
  Args:
    x_input: Batch of decoder input sequences for teacher forcing, sized
        `[batch_size, max(x_length), output_depth]`.
    x_target: Batch of expected output sequences to compute loss against,
        sized `[batch_size, max(x_length), output_depth]`.
    x_length: Length of input/output sequences, sized `[batch_size]`.
    z: (Optional) Latent vectors. Required if model is conditional. Sized
        `[n, z_size]`.
    c_input: (Optional) Batch of control sequences, sized
        `[batch_size, max(x_length), control_depth]`. Required if conditioning
        on control sequences.
  
  Returns:
    r_loss: The reconstruction loss for each sequence in the batch.
    metric_map: Map from metric name to tf.metrics return values for logging.
docstr_tok: ["Reconstruction","loss","calculation",".","Args",":","x_input",":","Batch","of","decoder","input","sequences","for","teacher","forcing",",","sized","`","[","batch_size",",","max","(","x_length",")",",","output_depth","]","`",".","x_target",":","Batch","of","expected","output","sequences","to","compute","loss","against",",","sized","`","[","batch_size",",","max","(","x_length",")",",","output_depth","]","`",".","x_length",":","Length","of","input\/output","sequences",",","sized","`","[","batch_size","]","`",".","z",":","(","Optional",")","Latent","vectors",".","Required","if","model","is","conditional",".","Sized","`","[","n",",","z_size","]","`",".","c_input",":","(","Optional",")","Batch","of","control","sequences",",","sized","`","[","batch_size",",","max","(","x_length",")",",","control_depth","]","`",".","Required","if","conditioning","on","control","sequences",".","Returns",":","r_loss",":","The","reconstruction","loss","for","each","sequence","in","the","batch",".","metric_map",":","Map","from","metric","name","to","tf.metrics","return","values","for","logging","."]
code: def reconstruction_loss(
      self, x_input, x_target, x_length, z=None, c_input=None
  ):
      """Reconstruction loss calculation.
  
      Args:
        x_input: Batch of decoder input sequences for teacher forcing, sized
            `[batch_size, max(x_length), output_depth]`.
        x_target: Batch of expected output sequences to compute loss against,
            sized `[batch_size, max(x_length), output_depth]`.
        x_length: Length of input/output sequences, sized `[batch_size]`.
        z: (Optional) Latent vectors. Required if model is conditional. Sized
            `[n, z_size]`.
        c_input: (Optional) Batch of control sequences, sized
            `[batch_size, max(x_length), control_depth]`. Required if conditioning
            on control sequences.
  
      Returns:
        r_loss: The reconstruction loss for each sequence in the batch.
        metric_map: Map from metric name to tf.metrics return values for logging.
      """
      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 2 for calling the BaseDecoder obj's underlying member method code with example usage: obj.reconstruction_loss(x_input, x_target, x_length, z, c_input) without return types