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)
评论列表
文章目录