allennlp.predictors.predictor.get_gradients got error RuntimeError: Expected object of backend CUDA but got backend CPU for argument #3 'index'

前端 未结 0 530
庸人自扰
庸人自扰 2021-01-15 03:44

I tried to use allennlp.predictors.Predictor.get_gradients to get the gradients of an instance.

The main code:

for instance in targeted_dev_data:

predic

相关标签:
回答
  • 消灭零回复
提交回复
热议问题