python - using leaky relu in Tensorflow -
how can change g_h1 = tf.nn.relu(tf.matmul(z, g_w1) + g_b1)
leaky relu? have tried looping on tensor using max(value, 0,01*value)
typeerror: using tf.tensor python bool not allowed.
i tried find source code on relu on tensorflow github can modify leaky relu couldn't find it..
you write 1 based on tf.relu
, like:
def lrelu(x, alpha): return tf.nn.relu(x) - alpha * tf.nn.relu(-x)
Comments
Post a Comment