环境:windows10,64 bit, NVIDIA显卡 , cuda8.0
1、
安装pytorch0.2 for win10 by anaconda参考:
https://zhuanlan.zhihu.com/p/26871672
2、编译
scheduler = torch.optim.lr_scheduler.MultiStepLR(optimizer, milestones=[150, 200], gamma=0.1)
遇到
AttributeError: module 'torch.optim' has no attribute 'lr_scheduler'
解决方法:
from torch.optim import lr_schedulerscheduler = lr_scheduler.MultiStepLR(optimizer, milestones=[150, 200], gamma=0.1)
参考网址:https://github.com/pytorch/pytorch/issues/2809