PaddlePaddle / X2Paddle

Deep learning model converter for PaddlePaddle. (『飞桨』深度学习模型转换工具)
http://www.paddlepaddle.org/
Apache License 2.0
727 stars 164 forks source link

pytorch转成paddle后transformers的包调用需要pytorch环境怎么办? #773

Open seancoding1 opened 2 years ago

seancoding1 commented 2 years ago

感谢您参与 X2Paddle 社区! 问题模版为了 X2Paddle 能更好的迭代,例如新功能发布、 RoadMaps 和错误跟踪. :smile_cat:

问题描述

pytorch转成paddle后transformers的包调用需要pytorch环境怎么办?

ImportError: get_linear_schedule_with_warmup requires the PyTorch library but it was not found in your environment. Checkout the instructions on the installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment. 以上是报错信息,transformers里面的学习率预热函数get_linear_schedule_with_warmup,paddle不支持 paddle有类似这样的函数吗?

具体信息

wjj19950828 commented 2 years ago

@seancoding1 目前训练代码转换属于实验性功能,还是建议使用PaddleNLP进行模型训练~