(self)
| 418 | |
| 419 | @test_util.run_in_graph_and_eager_modes |
| 420 | def testDynamicNoiseShape(self): |
| 421 | inputs = array_ops.ones((5, 3, 2)) |
| 422 | noise_shape = [None, 1, None] |
| 423 | dp = core_layers.Dropout(0.5, noise_shape=noise_shape, seed=1) |
| 424 | dropped = dp.apply(inputs, training=True) |
| 425 | self.evaluate(variables.global_variables_initializer()) |
| 426 | np_output = self.evaluate(dropped) |
| 427 | self.assertAlmostEqual(0., np_output.min()) |
| 428 | self.assertAllClose(np_output[:, 0, :], np_output[:, 1, :]) |
| 429 | |
| 430 | def testCustomNoiseShape(self): |
| 431 | inputs = array_ops.ones((5, 3, 2)) |
nothing calls this directly
no test coverage detected