class_docstr: Abstract encoder class.
  
  Implementations must define the following abstract methods:
   -`build`
   -`encode`
class_docstr_tok: ["Abstract","encoder","class",".","Implementations","must","define","the","following","abstract","methods",":","-","`","build","`","-","`","encode","`"]
docstr: Builder method for BaseEncoder.
  
  Args:
    hparams: An HParams object containing model hyperparameters.
    is_training: Whether or not the model is being used for training.
docstr_tok: ["Builder","method","for","BaseEncoder",".","Args",":","hparams",":","An","HParams","object","containing","model","hyperparameters",".","is_training",":","Whether","or","not","the","model","is","being","used","for","training","."]
code: def build(self, hparams, is_training=True):
      """Builder method for BaseEncoder.
  
      Args:
        hparams: An HParams object containing model hyperparameters.
        is_training: Whether or not the model is being used for training.
      """
      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 BaseEncoder obj's underlying member method code with example usage: obj.build(hparams, is_training) without return types