You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/home/seg/backbones_unet/utils/trainer.py", line 127, in _train_one_epoch
self.lr_scheduler.step() # this was originally: self.lr_scheduler.step()
TypeError: step() missing 1 required positional argument: 'metrics'
If I then set line 101 to self.lr_scheduler.step(loss) that seems to fix the error. However, when I start training I get this:
Training Model on 500 epochs: 0%| | 0/500 [00:00<?, ?it/s
Epoch 00032: reducing learning rate of group 0 to 1.0000e-04. | 31/800 [00:03<00:54, 14.03 training-batch/s, loss=1.1]
Epoch 00054: reducing learning rate of group 0 to 1.0000e-05. | 53/800 [00:04<00:51, 14.38 training-batch/s, loss=1.09]
Epoch 00062: reducing learning rate of group 0 to 1.0000e-06. | 61/800 [00:05<00:54, 13.45 training-batch/s, loss=1.06]
^Epoch 1: 13%|██████████████████ | 104/800 [00:08<00:58, 11.84 training-batch/s, loss=1.05]
I haven't seen that before when training models with code from other repos. If that is normal, then all is OK, I just wanted to report the missing argument error in trainer.py.
The text was updated successfully, but these errors were encountered:
Hello @bc-bytes, firstly, thank you for bringing up the issue. The library can not support the "REDUCELRONPLATEAU" and "COSINEANNEALINGWARMRESTARTS" lr schedulers. However, all other schedulers are supported. Therefore, receiving this error message is quite normal. If you use either of these two schedulers, the learning rate will not change. I intend to add additional support soon, thus making all lr scheduler classes available. Until then, you may use all other schedulers except for these two.
Many thanks for the suggestions. However, I am currently producing a set of baseline results from other repositories, and I have trained all those models using ReduceLROnPlateau, so changing the scheduler type would mean that the results would not be comparable to my previous ones.
In trainer.py (line 101) there is a missing argument. Here's how I define optimiser and lr_scheduler in train.py:
That throws the following error:
If I then set line 101 to
self.lr_scheduler.step(loss)
that seems to fix the error. However, when I start training I get this:I haven't seen that before when training models with code from other repos. If that is normal, then all is OK, I just wanted to report the missing argument error in trainer.py.
The text was updated successfully, but these errors were encountered: