net.py 文件源码

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

项目:chainer-cf-nade 作者: dsanno 项目源码 文件源码
def __call__(self, x1, train=True):
        """
        in_type:
            x1: float32
        in_shape:
            x1: (batch_size, train_item_num * rating_num)
        out_type: float32
        out_shape: (batch_size, hidden_num)
        """

        xp = cuda.get_array_module(x1.data)
        h = self.a(x1)
        if hasattr(self, 'b'):
            h = self.b(h)
#        h = F.dropout(h, train=train)
        return F.tanh(h)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号