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.
code: def _decode_with_identity_gradient(self, x):
      # identity backprop through the decoder.
      # This means that the optimizer must call encode when updating weights.
      @function.Defun(
          python_grad_func=lambda op, dy: dy,
          shape_func=lambda op: [op.inputs[0].get_shape()],
      )
      def my_fn(x):
          return self.decode(x)
  
      return my_fn(x)
  
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 3 for calling the ParameterEncoding obj's underlying member method code with example usage: obj._decode_with_identity_gradient(x) and returns: my_fn, self