Commit 709f89a9 authored by Yuxin Wu's avatar Yuxin Wu

fix old usage of leakyrelu

parent 81d5fbd8
...@@ -7,7 +7,7 @@ import tensorflow as tf ...@@ -7,7 +7,7 @@ import tensorflow as tf
from .common import layer_register, VariableHolder from .common import layer_register, VariableHolder
from .batch_norm import BatchNorm from .batch_norm import BatchNorm
from ..utils.develop import deprecated from ..utils.develop import log_deprecated
__all__ = ['Maxout', 'PReLU', 'LeakyReLU', 'BNReLU'] __all__ = ['Maxout', 'PReLU', 'LeakyReLU', 'BNReLU']
...@@ -62,7 +62,6 @@ def PReLU(x, init=0.001, name='output'): ...@@ -62,7 +62,6 @@ def PReLU(x, init=0.001, name='output'):
@layer_register(use_scope=None) @layer_register(use_scope=None)
@deprecated("Use tf.nn.leaky_relu in TF 1.4 instead!", "2018-03-30")
def LeakyReLU(x, alpha, name='output'): def LeakyReLU(x, alpha, name='output'):
""" """
Leaky ReLU as in paper `Rectifier Nonlinearities Improve Neural Network Acoustic Leaky ReLU as in paper `Rectifier Nonlinearities Improve Neural Network Acoustic
...@@ -73,6 +72,7 @@ def LeakyReLU(x, alpha, name='output'): ...@@ -73,6 +72,7 @@ def LeakyReLU(x, alpha, name='output'):
x (tf.Tensor): input x (tf.Tensor): input
alpha (float): the slope. alpha (float): the slope.
""" """
log_deprecated("LeakyReLU", "Use tf.nn.leaky_relu in TF 1.4 instead!", "2018-03-30")
return tf.maximum(x, alpha * x, name=name) return tf.maximum(x, alpha * x, name=name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment