Closed gsganden closed 3 years ago
It looks like we just need to change sqrmom
to sqr_mom
. I'll submit a PR.
Tangential suggestion: put from fastai.callback.wandb import WandbCallback
and import wandb
under if WANDB
so that folks who haven't installed wandb
don't have to change anything.
Thanks for reminding me of this, I will be making these changes on the current branch I am working on.
Describe the bug The fine tuning steps raise the error
TypeError: RAdam() got an unexpected keyword argument 'sqrmom'
in at least the SimCLR and SwAV tutorials (e.g.finetune(size, epochs=5, arch='xresnet34', encoder_path=f'models/swav_iwang_sz{size}_epc100_encoder.pth')
in https://keremturgutlu.github.io/self_supervised/training_swav_iwang.html).To Reproduce Steps to reproduce the behavior:
Runtime
>Change runtime type
in the menu and setHardware accelerator
toGPU
.!pip install self-supervised
.from fastai.callback.wandb import WandbCallback
andimport wandb
.bs, resize, size = 96, 256, 224
tobs, resize, size = 48, 256, 224
to avoid a CUDA out of memory error.lr,wd,epochs=1e-2,1e-2,100
tolr,wd,epochs=1e-2,1e-2,1
andfinetune(size, epochs=5, arch='xresnet34', encoder_path=f'models/swav_iwang_sz{size}_epc100_encoder.pth'
tofinetune(size, epochs=5, arch='xresnet34', encoder_path=f'models/swav_iwang_sz{size}_epc1_encoder.pth'
to get to the error much faster.Expected behavior I expect the model to train without errors.
Error with full stack trace
Additional context The notebook runs fine if you remove
sqrmom
fromoptdict = dict(sqrmom=0.99,mom=0.95,beta=0.,eps=1e-4)
, but I suspect the preferred solution involves calling a different function that acceptssqrmom
.I also get this error when I run the notebook locally after
pip install self-supervised
in a fresh pyenv-virtualenv environment.My library versions look right to me: