jreros
jreros
不支持异步不好适应生产环境,现在用起来都是各种手段的hack。能落地到生产环境才有真爱呀;)
> 您好,是PaddleNLP还是PaddleRec下面的SimNet?获得句子的向量值可以把要得到的句子的变量名放到fetch_list里fetch出来。 你好,是PaddleNLP里的。谢谢回答,能详细说一下吗?
> 比如[https://github.com/PaddlePaddle/models/blob/6791e34a716761a7e8277d4414b5609e9cc8729f/PaddleNLP/models/matching/mm_dnn.py#L148这里,想拿到left_seq_encoder的值的话,在executor](https://github.com/PaddlePaddle/models/blob/6791e34a716761a7e8277d4414b5609e9cc8729f/PaddleNLP/models/matching/mm_dnn.py#L148%E8%BF%99%E9%87%8C%EF%BC%8C%E6%83%B3%E6%8B%BF%E5%88%B0left_seq_encoder%E7%9A%84%E5%80%BC%E7%9A%84%E8%AF%9D%EF%BC%8C%E5%9C%A8executor) run的时候 fetch_list=[left_seq_encoder.name] 就可以拿到这个值了,executor run的示例可以在下面的链接看 > https://www.paddlepaddle.org.cn/documentation/docs/zh/1.5/api_cn/executor_cn.html#run 明白了,谢谢!