(self)
| 99 | self.assertAllEqual(result, [[42.0]]) |
| 100 | |
| 101 | def testCreate(self): |
| 102 | with session.Session(): |
| 103 | inp = constant_op.constant(10.0, shape=[2, 3], name='W1') |
| 104 | copy = array_ops.identity(inp) |
| 105 | # Test with feed. |
| 106 | # TODO(mrry): Investigate why order='F' didn't work. |
| 107 | arr = np.asarray([[0, 1, 2], [3, 4, 5]], dtype=np.float32, order='C') |
| 108 | copy_val = copy.eval({'W1:0': arr}) |
| 109 | self.assertAllEqual(arr, copy_val) |
| 110 | # Test without feed. |
| 111 | copy_val = copy.eval() |
| 112 | self.assertAllEqual( |
| 113 | np.asarray( |
| 114 | [[10.0, 10.0, 10.0], [10.0, 10.0, 10.0]], dtype=np.float32), |
| 115 | copy_val) |
| 116 | |
| 117 | def testManyCPUs(self): |
| 118 | with session.Session( |
nothing calls this directly
no test coverage detected