def free_energy(self,v):
vbias_term = v.mv(self.v_bias)
wx_b = torch.clamp(F.linear(v,self.W,self.h_bias),-80,80)
hidden_term = wx_b.exp().add(1).log().sum(1)
return (-hidden_term - vbias_term).mean()
model_DBN.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录