loopprocessing.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:MusicGenerator 作者: Conchylicultor 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号