class_docstr: Helper class for encoding weights as bfloat16.
  
  For now, the parameters are always stored (encoded) as bfloat16 and decoded
  to bfloat32.  Confusingly, the custom getter then converts the bfloat32 back
  to a bfloat16 to use as an activation, assuming that we use bfloat16 for
  activations.
  
  TODO(noam): Add options for activation dtype=float32, and for different
  storage dtypes.
docstr: Encode float32 to bfloat16.
  
  Args:
    x: a float32 Tensor
    noise: a float32 Tensor with values in [0, 1), broadcastable to shape(x)
  
  Returns:
    a bfloat16 Tensor
docstr_tok: ["Encode","float32","to","bfloat16",".","Args",":","x",":","a","float32","Tensor","noise",":","a","float32","Tensor","with","values","in","[","0",",","1",")",",","broadcastable","to","shape","(","x",")","Returns",":","a","bfloat16","Tensor"]
code: def encode(self, x, noise):
      """Encode float32 to bfloat16.
  
      Args:
        x: a float32 Tensor
        noise: a float32 Tensor with values in [0, 1), broadcastable to shape(x)
  
      Returns:
        a bfloat16 Tensor
      """
      raise NotImplementedError("encode not implemented")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow.compat.v1
  from tensorflow.python.framework import function
label_desc: Use image node_id 1 for calling the ParameterEncoding obj's underlying member method code with example usage: obj.encode(x, noise) without return types