I have a very simple learner created in the following way:
learn = cnn_learner(dls=all_data,arch=resnet18, metrics=[accuracy, mcc, auroc]).to_fp16()
all_data is an
mcc is an instance of
auroc an instance of
RocAucBinary() (just some metrics). When i use the
learn.fine_tune() method, i pass the callback
SaveModelCallback() (and some others) in the following way:
cbs=[SaveModelCallback(monitor=‘matthews_corrcoef’, comp=np.greater, fname=‘resnet18_3’, with_opt=False, reset_on_fit=True),
EarlyStoppingCallback(monitor=‘matthews_corrcoef’, comp=np.greater, min_delta=0.01, patience=3),
When i do so, the training goes normally, but i keep getting this warning after every epoch:
C:\Users\chris\anaconda3\envs\fastai_env\lib\site-packages\fastai\learner.py:54: UserWarning: Saved filed doesn’t contain an optimizer state.
elif with_opt: warn(“Saved filed doesn’t contain an optimizer state.”)
I know that it is the
SaveModelCallback() since the warning disappears once i remove it.
Since it’s just a warning, i’m not exactly sure if i’m doing something wrong here. Can anyone help me? Thanks!!