我正在使用PyTorch的学习速率调度程序CyclicLR
,它具有:
scheduler = torch.optim.lr_scheduler.CyclicLR(model.optimizer, base_lr=1e-6, max_lr=1e-3, step_size_up=1000, mode="triangular2", cycle_momentum=False)
然而,我有时会遇到这样的错误,这使我不得不重新训练我的整个模型:
/usr/local/lib/python3.7/dist-packages/torch/optim/lr_scheduler.py in _triangular2_scale_fn(self, x)
876
877 def _triangular2_scale_fn(self, x):
--> 878 return 1 / (2. ** (x - 1))
879
880 def _exp_range_scale_fn(self, x):
OverflowError: (34, 'Numerical result out of range')
有办法解决这个问题吗
目前没有回答
相关问题 更多 >
编程相关推荐