class_docstr: Base class to implement an encoder that creates a latent z vector.
  
  Users should override compute_z() to define the actual encoder structure.
  Input_keys from compute_z() instead of call(), output_keys are always ['z'].
docstr: Constructor.
docstr_tok: ["Constructor","."]
code: def __init__(self, input_keys=None, **kwargs):
      """Constructor."""
      input_keys = input_keys or self.get_argument_names("compute_z")
      super().__init__(input_keys, output_keys=["z"], **kwargs)
  
      # TODO(jesseengel): remove dependence on arbitrary key.
      self.input_keys.append("f0_scaled")
  
imports: import ddsp
  from ddsp import spectral_ops
  from ddsp.training import nn
  import gin
  import tensorflow.compat.v2
label_desc: Use image node_id 1 to create a new ZEncoder object from inherited base classes: nn with example: obj = ZEncoder(input_keys)