(self)
| 169 | |
| 170 | @test_util.run_in_graph_and_eager_modes |
| 171 | def testActivation(self): |
| 172 | dense = core_layers.Dense(2, activation=nn_ops.relu, name='dense1') |
| 173 | inputs = random_ops.random_uniform((5, 3), seed=1) |
| 174 | outputs = dense(inputs) |
| 175 | if not context.executing_eagerly(): |
| 176 | self.assertEqual(outputs.op.name, 'dense1/Relu') |
| 177 | |
| 178 | dense = core_layers.Dense(2, name='dense2') |
| 179 | inputs = random_ops.random_uniform((5, 3), seed=1) |
| 180 | outputs = dense(inputs) |
| 181 | if not context.executing_eagerly(): |
| 182 | self.assertEqual(outputs.op.name, 'dense2/BiasAdd') |
| 183 | |
| 184 | @test_util.run_deprecated_v1 |
| 185 | def testActivityRegularizer(self): |
nothing calls this directly
no test coverage detected