class_docstr: An object use to hold the sharding policy for a Tensor.
class_docstr_tok: ["An","object","use","to","hold","the","sharding","policy","for","a","Tensor","."]
docstr: Prevents further modification to the sharding policy.
  
  Any values that have not been set when freeze is called are set to
  defaults. If the ShardingPolicy is already frozen, this is a NoOp.
docstr_tok: ["Prevents","further","modification","to","the","sharding","policy",".","Any","values","that","have","not","been","set","when","freeze","is","called","are","set","to","defaults",".","If","the","ShardingPolicy","is","already","frozen",",","this","is","a","NoOp","."]
code: def freeze(self):
      """Prevents further modification to the sharding policy.
  
      Any values that have not been set when freeze is called are set to
      defaults. If the ShardingPolicy is already frozen, this is a NoOp.
      """
      if not self._frozen:
          self._fill_default_values()
          self._frozen = True
  
file_path: tensorflow-upstream/tensorflow/python/tpu/tpu_sharding.py
imports: from tensorflow.python.framework import tensor_shape
label_desc: Use image node_id 4 for calling the ShardingPolicy obj's underlying member method code with example usage: obj.freeze() without return types