(self)
| 1075 | class LeakyReluTest(test_lib.TestCase): |
| 1076 | |
| 1077 | def testRange(self): |
| 1078 | batch_size = 3 |
| 1079 | height, width = 4, 4 |
| 1080 | np.random.seed(1) # Make it reproducible. |
| 1081 | inputs = np.random.uniform(size=(batch_size, height, width, 3)).astype( |
| 1082 | np.float32) |
| 1083 | inputs = constant_op.constant(inputs) |
| 1084 | |
| 1085 | outputs = nn_ops.leaky_relu(inputs) |
| 1086 | self.assertEquals(inputs.shape, outputs.shape) |
| 1087 | |
| 1088 | inputs, outputs = self.evaluate([inputs, outputs]) |
| 1089 | |
| 1090 | self.assertGreaterEqual(outputs.min(), 0.0) |
| 1091 | self.assertLessEqual(outputs.max(), 1.0) |
| 1092 | self.assertAllClose(inputs, outputs) |
| 1093 | |
| 1094 | @test_util.run_deprecated_v1 |
| 1095 | def testValues(self): |
nothing calls this directly
no test coverage detected