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

Method setUp

tensorflow/python/ops/op_selector_test.py:30–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28class SelectTest(test.TestCase):
29
30 def setUp(self):
31 self.graph = ops_lib.Graph()
32 with self.graph.as_default():
33 self.a = constant_op.constant([1., 1.], shape=[2], name="a")
34 with ops_lib.name_scope("foo"):
35 self.b = constant_op.constant([2., 2.], shape=[2], name="b")
36 self.c = math_ops.add(self.a, self.b, name="c")
37 self.d = constant_op.constant([3., 3.], shape=[2], name="d")
38 with ops_lib.name_scope("bar"):
39 self.e = math_ops.add(self.c, self.d, name="e")
40 self.f = math_ops.add(self.c, self.d, name="f")
41 self.g = math_ops.add(self.c, self.a, name="g")
42 with ops_lib.control_dependencies([self.c.op]):
43 self.h = math_ops.add(self.f, self.g, name="h")
44
45 def test_is_iterable(self):
46 """Test for is_iterable."""

Callers

nothing calls this directly

Calls 6

GraphMethod · 0.45
as_defaultMethod · 0.45
constantMethod · 0.45
name_scopeMethod · 0.45
addMethod · 0.45
control_dependenciesMethod · 0.45

Tested by

no test coverage detected