def gibbs_sample_x(self, h):
"""
Sample a new x from p(x|h) using current parameters.
:param h: shape (dim_hidden, 1)
:return: shape (dim_input, 1)
"""
x_mean = expit(self.bias_input + self.W.transpose().dot(h))
return self.bernoulli(x_mean)
评论列表
文章目录