def v_to_h(v, W, h_bias):
# p_h = F.sigmoid(v.mm(self.W.t()) + self.h_bias.repeat(v.size()[0],1))
p_h = torch.sigmoid(F.linear(v,W,h_bias))
h = torch.bernoulli(p_h)
return p_h,h
utils.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录