DeepKE icon indicating copy to clipboard operation
DeepKE copied to clipboard

怎样调用GPU跑代码?

Open zmt1002 opened this issue 3 years ago • 1 comments

Describe the question 你好,在使用CPU跑deepke/example/re/few-shot的代码过程中,训练速度很慢,想请问一下在这个项目里如何调用GPU去跑代码?

zmt1002 avatar Dec 13 '22 14:12 zmt1002

https://github.com/zjunlp/DeepKE/blob/main/example/re/few-shot/run.py#L44 这一行如果cuda可用会用机器中第一张gpu卡跑

tlk1997 avatar Dec 13 '22 15:12 tlk1997