def __call__(X):
""" Predict the output from prev and scale the result on [-1, 1]
Use sigmoid activation
Args:
X (tf.Tensor): the input
Return:
tf.Ops: the activate_and_scale operator
"""
# TODO: Use tanh instead ? tanh=2*sigm(2*x)-1
with tf.name_scope('activate_and_scale'):
return tf.sub(tf.mul(2.0, tf.nn.sigmoid(X)), 1.0) # x_{i} = 2*sigmoid(y_{i-1}) - 1
评论列表
文章目录