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

Method testSharedGraph

tensorflow/python/client/session_test.py:1385–1393  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1383 sess.close()
1384
1385 def testSharedGraph(self):
1386 with ops.Graph().as_default() as g, ops.device('/cpu:0'):
1387 a = constant_op.constant(1.0, shape=[1, 2])
1388 b = constant_op.constant(2.0, shape=[2, 3])
1389 c = math_ops.matmul(a, b)
1390
1391 with session.Session(graph=g) as sess1:
1392 with session.Session(graph=g) as sess2:
1393 self.assertAllEqual(sess1.run(c), sess2.run(c))
1394
1395 def testDuplicatedInputs(self):
1396 with session.Session() as sess:

Callers

nothing calls this directly

Calls 8

as_defaultMethod · 0.45
GraphMethod · 0.45
deviceMethod · 0.45
constantMethod · 0.45
matmulMethod · 0.45
SessionMethod · 0.45
assertAllEqualMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected