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

Method testScalar

tensorflow/python/tpu/tpu_sharding_test.py:129–134  ·  view source on GitHub ↗

Tests sharding and unsharding scalars.

(self)

Source from the content-addressed store, hash-verified

127 _ = p.get_unsharded_shape([[2], [4, 3]])
128
129 def testScalar(self):
130 """Tests sharding and unsharding scalars."""
131 p = tpu_sharding.ShardingPolicy()
132 p.freeze()
133 self.assertEqual(p.get_sharded_shape([]), [])
134 self.assertEqual(p.get_unsharded_shape([[]]), [])
135
136
137if __name__ == "__main__":

Callers

nothing calls this directly

Calls 3

freezeMethod · 0.95
get_sharded_shapeMethod · 0.95
get_unsharded_shapeMethod · 0.95

Tested by

no test coverage detected