(self)
| 128 | |
| 129 | @test_util.run_in_graph_and_eager_modes |
| 130 | def testOutputShape(self): |
| 131 | dense = core_layers.Dense(7, activation=nn_ops.relu, name='my_dense') |
| 132 | inputs = random_ops.random_uniform((5, 3), seed=1) |
| 133 | outputs = dense.apply(inputs) |
| 134 | self.assertEqual(outputs.get_shape().as_list(), [5, 7]) |
| 135 | |
| 136 | inputs = random_ops.random_uniform((5, 2, 3), seed=1) |
| 137 | outputs = dense(inputs) |
| 138 | self.assertEqual(outputs.get_shape().as_list(), [5, 2, 7]) |
| 139 | |
| 140 | inputs = random_ops.random_uniform((1, 2, 4, 3), seed=1) |
| 141 | outputs = dense.apply(inputs) |
| 142 | self.assertEqual(outputs.get_shape().as_list(), [1, 2, 4, 7]) |
| 143 | |
| 144 | @test_util.run_deprecated_v1 |
| 145 | def testCallOnPlaceHolder(self): |
nothing calls this directly
no test coverage detected