class_docstr: A MidiAutoencoder that has additional z encoders.
  
  This is set up similar to the base MidiAutoencoder, except that there are
  many more places to learn encoding "z" variables to enable better
  reconstruction or better learnable representations.
docstr: Constructor.
  
  Args:
    synthcoder: Callable network that decodes f0, loudness, z to synth
      parameters (amplitude, noise magnitudes, and a harmonic distribution).
    midi_encoder: Callable network that will be used to create a MIDI-like
      latent.
    midi_decoder: Callable network that will turn the MIDI latent vector back
      into f0 and amplitude features.
    sg_before_midiae: Bool indicating whether a stop gradient will happen
      before the MIDI space autoencoder.
    reverb: Bool controlling whether reverb is added to the processor group.
    preprocessor: Module to preprocess the input batch.
    reconstruction_losses: LossGroup for any and all things that need to be
      reconstructed (synth_audio, f0, amps, hd, noise, f0, etc).
    qpitch_f0rec_loss: Margin loss obj between quantized pitch and f0
      reconstruction. Ignored if `None`.
    pitch_f0rec_loss: Margin loss obj between unquantized pitch and f0
      reconstruction. Ignored if `None`.
    pitch_qpitch_loss: L-norm loss obj between unquantized pitch and quantized
      pitch. Ignored if `None`.
    midi_slowness_loss: Callable loss object that computes how slow the latent
      space is. Ignored if `None`.
    mask_f0_loss: Ignore f0 reconstruction loss where f0 and MIDI are very
      different.
    z_synth_encoders: A list of callable networks that encodes audio as
      latents.
    z_global_encoders: A list of callable networks that will return non-MIDI
      latent representations.
    z_note_encoder: An encoder that encodes per-note latents, only for
      MIDI decoding, not for the synthcoder.
    z_preconditioning_stack: Optional callable network that will be used
      on the concatenated output of the z_global_encoders.
    z_global_prior: Prior loss on the global latents.
    z_note_prior: Prior loss on the note latents.
    **kwargs: Other kwargs for keras models including `name`.
docstr_tok: ["Constructor",".","Args",":","synthcoder",":","Callable","network","that","decodes","f0",",","loudness",",","z","to","synth","parameters","(","amplitude",",","noise","magnitudes",",","and","a","harmonic","distribution",")",".","midi_encoder",":","Callable","network","that","will","be","used","to","create","a","MIDI-like","latent",".","midi_decoder",":","Callable","network","that","will","turn","the","MIDI","latent","vector","back","into","f0","and","amplitude","features",".","sg_before_midiae",":","Bool","indicating","whether","a","stop","gradient","will","happen","before","the","MIDI","space","autoencoder",".","reverb",":","Bool","controlling","whether","reverb","is","added","to","the","processor","group",".","preprocessor",":","Module","to","preprocess","the","input","batch",".","reconstruction_losses",":","LossGroup","for","any","and","all","things","that","need","to","be","reconstructed","(","synth_audio",",","f0",",","amps",",","hd",",","noise",",","f0",",","etc",")",".","qpitch_f0rec_loss",":","Margin","loss","obj","between","quantized","pitch","and","f0","reconstruction",".","Ignored","if","`","None","`",".","pitch_f0rec_loss",":","Margin","loss","obj","between","unquantized","pitch","and","f0","reconstruction",".","Ignored","if","`","None","`",".","pitch_qpitch_loss",":","L-norm","loss","obj","between","unquantized","pitch","and","quantized","pitch",".","Ignored","if","`","None","`",".","midi_slowness_loss",":","Callable","loss","object","that","computes","how","slow","the","latent","space","is",".","Ignored","if","`","None","`",".","mask_f0_loss",":","Ignore","f0","reconstruction","loss","where","f0","and","MIDI","are","very","different",".","z_synth_encoders",":","A","list","of","callable","networks","that","encodes","audio","as","latents",".","z_global_encoders",":","A","list","of","callable","networks","that","will","return","non-MIDI","latent","representations",".","z_note_encoder",":","An","encoder","that","encodes","per-note","latents",",","only","for","MIDI","decoding",",","not","for","the","synthcoder",".","z_preconditioning_stack",":","Optional","callable","network","that","will","be","used","on","the","concatenated","output","of","the","z_global_encoders",".","z_global_prior",":","Prior","loss","on","the","global","latents",".","z_note_prior",":","Prior","loss","on","the","note","latents",".","*","*","kwargs",":","Other","kwargs","for","keras","models","including","`","name","`","."]
code: def __init__(
      self,
      synthcoder=None,
      midi_encoder=None,
      midi_decoder=None,
      sg_before_midiae=True,
      reverb=True,
      preprocessor=None,
      reconstruction_losses=None,
      qpitch_f0rec_loss=None,
      pitch_f0rec_loss=None,
      pitch_qpitch_loss=None,
      midi_slowness_loss=None,
      mask_f0_loss=True,
      z_synth_encoders=None,
      z_global_encoders=None,
      z_note_encoder=None,
      z_preconditioning_stack=None,
      z_global_prior=None,
      z_note_prior=None,
      **kwargs,
  ):
      """Constructor.
  
      Args:
        synthcoder: Callable network that decodes f0, loudness, z to synth
          parameters (amplitude, noise magnitudes, and a harmonic distribution).
        midi_encoder: Callable network that will be used to create a MIDI-like
          latent.
        midi_decoder: Callable network that will turn the MIDI latent vector back
          into f0 and amplitude features.
        sg_before_midiae: Bool indicating whether a stop gradient will happen
          before the MIDI space autoencoder.
        reverb: Bool controlling whether reverb is added to the processor group.
        preprocessor: Module to preprocess the input batch.
        reconstruction_losses: LossGroup for any and all things that need to be
          reconstructed (synth_audio, f0, amps, hd, noise, f0, etc).
        qpitch_f0rec_loss: Margin loss obj between quantized pitch and f0
          reconstruction. Ignored if `None`.
        pitch_f0rec_loss: Margin loss obj between unquantized pitch and f0
          reconstruction. Ignored if `None`.
        pitch_qpitch_loss: L-norm loss obj between unquantized pitch and quantized
          pitch. Ignored if `None`.
        midi_slowness_loss: Callable loss object that computes how slow the latent
          space is. Ignored if `None`.
        mask_f0_loss: Ignore f0 reconstruction loss where f0 and MIDI are very
          different.
        z_synth_encoders: A list of callable networks that encodes audio as
          latents.
        z_global_encoders: A list of callable networks that will return non-MIDI
          latent representations.
        z_note_encoder: An encoder that encodes per-note latents, only for
          MIDI decoding, not for the synthcoder.
        z_preconditioning_stack: Optional callable network that will be used
          on the concatenated output of the z_global_encoders.
        z_global_prior: Prior loss on the global latents.
        z_note_prior: Prior loss on the note latents.
        **kwargs: Other kwargs for keras models including `name`.
      """
      super().__init__(
          synthcoder=synthcoder,
          midi_encoder=midi_encoder,
          midi_decoder=midi_decoder,
          sg_before_midiae=sg_before_midiae,
          reverb=reverb,
          preprocessor=preprocessor,
          reconstruction_losses=reconstruction_losses,
          qpitch_f0rec_loss=qpitch_f0rec_loss,
          pitch_f0rec_loss=pitch_f0rec_loss,
          pitch_qpitch_loss=pitch_qpitch_loss,
          midi_slowness_loss=midi_slowness_loss,
          mask_f0_loss=mask_f0_loss,
          **kwargs,
      )
  
      self.z_synth_encoders = z_synth_encoders
      self.z_global_encoders = z_global_encoders
      self.z_note_encoder = z_note_encoder
      self.z_preconditioning_stack = z_preconditioning_stack
      self.z_global_prior = z_global_prior
      self.z_note_prior = z_note_prior
  
imports: import ddsp
  from ddsp.training import nn
  from ddsp.training import preprocessing
  from ddsp.training.models.model import Model
  import tensorflow
label_desc: Use image node_id 1 to create a new ZMidiAutoencoder object from inherited base classes: MidiAutoencoder with example: obj = ZMidiAutoencoder(synthcoder, midi_encoder, midi_decoder, sg_before_midiae, reverb, preprocessor, reconstruction_losses, qpitch_f0rec_loss, pitch_f0rec_loss, pitch_qpitch_loss, midi_slowness_loss, mask_f0_loss, z_synth_encoders, z_global_encoders, z_note_encoder, z_preconditioning_stack, z_global_prior, z_note_prior)