2

尝试在 google colab 上运行 python 笔记本时,在https://medium.com/@markn_67491/run-allennlp-models-on-free-gpus-using-googles-colab-notebooks-4db9359970c1中提到,可从:https: //drive.google.com/file/d/1JH6dz8GJbwh9GhPoZQKwR-EipeR5JBrV/view

安装 pytorch 和 AllenNlp 后我运行

from allennlp.models.archival import load_archive
from allennlp.service.predictors import Predictor
import pprint

pretty_print = pprint.PrettyPrinter(indent=4)

由于...而在第二行崩溃

AttributeError:模块“torch.optim.lr_scheduler”没有属性“CosineAnnealingLR”

注意:https ://github.com/pytorch/pytorch/issues/3214建议升级到 3.0 版,但即使使用 pip3 安装http://download.pytorch.org/whl/cu80/torch-0.3.1-cp36-cp36m -linux_x86_64.whl 即版本 3.1 问题仍然存在。有什么建议么

4

0 回答 0