class_docstr: A replacement for tf.Variable which follows initial value placement.
  
  The class also handles restore/save operations in DTensor. Note that,
  DVariable may fall back to normal tf.Variable at this moment if
  `initial_value` is not a DTensor.
class_docstr_tok: ["A","replacement","for","tf.Variable","which","follows","initial","value","placement",".","The","class","also","handles","restore\/save","operations","in","DTensor",".","Note","that",",","DVariable","may","fall","back","to","normal","tf.Variable","at","this","moment","if","`","initial_value","`","is","not","a","DTensor","."]
docstr: Enables saving float32 as bfloat16.
docstr_tok: ["Enables","saving","float32","as","bfloat16","."]
code: def save_as_bf16(self, save_as_bf16):
      """Enables saving float32 as bfloat16."""
      self._save_as_bf16 = save_as_bf16 and self.dtype == dtypes.float32
  
imports: import functools
  from tensorflow.dtensor.python import api
  from tensorflow.dtensor.python import layout
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.trackable import base
  from tensorflow.python.training.saving import saveable_object
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 3 for calling the DVariable obj's underlying member method code with example usage: obj.save_as_bf16(save_as_bf16) without return types