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

Method testBasic

tensorflow/python/framework/ops_test.py:3114–3122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3112
3113 @test_util.run_deprecated_v1
3114 def testBasic(self):
3115 a = constant_op.constant([2.0], name="a")
3116 with ops.colocate_with(a.op):
3117 b = constant_op.constant(3.0)
3118 c = constant_op.constant(4.0)
3119 self.assertEqual([b"loc:@a"], a.op.colocation_groups())
3120 self.assertEqual([b"loc:@a"], b.op.colocation_groups())
3121 with self.assertRaises(ValueError):
3122 c.op.get_attr("_class")
3123
3124 @test_util.run_deprecated_v1
3125 def testBasicColocationMetadata(self):

Callers

nothing calls this directly

Calls 4

colocate_withMethod · 0.80
colocation_groupsMethod · 0.80
constantMethod · 0.45
get_attrMethod · 0.45

Tested by

no test coverage detected