SPG icon indicating copy to clipboard operation
SPG copied to clipboard

咨询下,该报错怎么解决?

Open zhanghaobucunzai opened this issue 4 years ago • 1 comments

../models/google/inception3_spg.py:137: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_. nn.init.xavier_uniform(m.weight.data) => loading checkpoint '../models/inception_v3_google-1a9a5a14.pth' KeyError Traceback (most recent call last): File "../utils/Restore.py", line 24, in restore args.current_epoch = checkpoint['epoch'] + 1 KeyError: 'epoch'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "train_frame.py", line 194, in train(args) File "train_frame.py", line 98, in train model, optimizer= get_model(args) File "train_frame.py", line 88, in get_model restore(args, model, optimizer, including_opt=False) File "../utils/Restore.py", line 38, in restore _model_load(model, checkpoint) File "../utils/Restore.py", line 51, in _model_load if model_dict.keys()[0].startswith('module.'): TypeError: 'odict_keys' object is not subscriptable

zhanghaobucunzai avatar Jun 23 '21 06:06 zhanghaobucunzai

The checkpoint is not correctly loaded. Place the checkpoint at the right location or change the path to the checkpoint.

xiaomengyc avatar Jul 07 '21 02:07 xiaomengyc