model_pp_relation.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:onto-lstm 作者: pdasigi 项目源码 文件源码
def write_predictions(self, inputs):
        rev_label_map = {j: i for (i, j) in self.label_map.items()}
        predictions = numpy.argmax(self.model.predict(inputs), axis=1)
        test_output_file = open("%s.predictions" % self.model_name_prefix, "w")
        for prediction in predictions:
            print >>test_output_file, rev_label_map[prediction + 1]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号