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

Method testInteractive

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

Source from the content-addressed store, hash-verified

1299
1300 @test_util.run_v1_only('b/120545219')
1301 def testInteractive(self):
1302 with ops.device('/cpu:0'):
1303 sess = session.InteractiveSession()
1304 a = constant_op.constant(1.0, shape=[1, 2])
1305 b = constant_op.constant(2.0, shape=[2, 3])
1306 c = math_ops.matmul(a, b)
1307 self.assertAllEqual([[4.0, 4.0, 4.0]], c.eval())
1308 d = constant_op.constant([1.0, 2.0, 3.0], shape=[3, 1])
1309 e = math_ops.matmul(c, d)
1310 self.assertAllEqual([[24.0]], e.eval())
1311 sess.close()
1312
1313 @test_util.run_v1_only('b/120545219')
1314 def testMultipleInteractiveSessionsWarning(self):

Callers

nothing calls this directly

Calls 6

closeMethod · 0.95
deviceMethod · 0.45
constantMethod · 0.45
matmulMethod · 0.45
assertAllEqualMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected