MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / freeze

Method freeze

tensorflow/python/tpu/tpu_sharding.py:54–62  ·  view source on GitHub ↗

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.

(self)

Source from the content-addressed store, hash-verified

52 _DEFAULT_SHARD_DIMENSION)
53
54 def freeze(self):
55 """Prevents further modification to the sharding policy.
56
57 Any values that have not been set when freeze is called are set to
58 defaults. If the ShardingPolicy is already frozen, this is a NoOp.
59 """
60 if not self._frozen:
61 self._fill_default_values()
62 self._frozen = True
63
64 @property
65 def number_of_shards(self):

Callers 5

testFreezeMethod · 0.95
testFrozenMethod · 0.95
testMergeMethod · 0.95
testGetShardedShapeMethod · 0.95
testScalarMethod · 0.95

Calls 1

_fill_default_valuesMethod · 0.95

Tested by 5

testFreezeMethod · 0.76
testFrozenMethod · 0.76
testMergeMethod · 0.76
testGetShardedShapeMethod · 0.76
testScalarMethod · 0.76