| 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): |