本文整理汇总了Python中Features.make_feature_planes_stones_4liberties_4history_ko_4captures_komi方法的典型用法代码示例。如果您正苦于以下问题:Python Features.make_feature_planes_stones_4liberties_4history_ko_4captures_komi方法的具体用法?Python Features.make_feature_planes_stones_4liberties_4history_ko_4captures_komi怎么用?Python Features.make_feature_planes_stones_4liberties_4history_ko_4captures_komi使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Features
的用法示例。
在下文中一共展示了Features.make_feature_planes_stones_4liberties_4history_ko_4captures_komi方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_position_eval
# 需要导入模块: import Features [as 别名]
# 或者: from Features import make_feature_planes_stones_4liberties_4history_ko_4captures_komi [as 别名]
def get_position_eval(self):
#assert self.model.Nfeat == 21
#board_feature_planes = Features.make_feature_planes_stones_4liberties_4history_ko_4captures(self.board, self.board.color_to_play).astype(np.float32)
#Normalization.apply_featurewise_normalization_C(board_feature_planes)
assert self.model.Nfeat == 22
board_feature_planes = Features.make_feature_planes_stones_4liberties_4history_ko_4captures_komi(self.board, self.board.color_to_play, self.komi).astype(np.float32)
Normalization.apply_featurewise_normalization_D(board_feature_planes)
feature_batch = Symmetry.make_symmetry_batch(board_feature_planes)
feed_dict = {self.feature_planes: feature_batch}
probs_batch = self.sess.run(self.probs_op, feed_dict)
prob = average_probs_over_symmetries(probs_batch)
if self.board.color_to_play == Color.White:
prob *= -1
return prob