(x)
| 96 | def test_get_leaky_relu_layer(self, strategy): |
| 97 | @tf.function |
| 98 | def forward(x): |
| 99 | fn = tf_utils.get_activation( |
| 100 | 'leaky_relu', use_keras_layer=True, alpha=0.1) |
| 101 | return strategy.run(fn, args=(x,)).values[0] |
| 102 | |
| 103 | got = forward(tf.constant([-1])) |
| 104 | self.assertAllClose(got, tf.constant([-0.1])) |