def get_parameter_updaters(self, data, gamma_weighted, gamma_sum):
tf_parameter_updaters = []
for dim in range(self.dims):
tf_partition = tf.dynamic_partition(gamma_weighted, data[0][:, dim], self.counts[dim])
tf_new_means = tf.parallel_stack([tf.reduce_sum(p) for p in tf_partition])
tf_parameter_updaters.append(self.tf_means[dim].assign(tf_new_means))
return tf_parameter_updaters
categorical_distribution.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录