def log_py(self, y, test=False):
xp = self.xp
num_types_of_label = y.data.shape[1]
# prior p(y) expecting that all classes are evenly distributed
constant = math.log(1.0 / num_types_of_label)
log_py = xp.full((y.data.shape[0],), constant, xp.float32)
return Variable(log_py)
# this will not be used
评论列表
文章目录