Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'epoch'. #219

Open
hhhhhhluo opened this issue Sep 20, 2023 · 0 comments
Open

KeyError: 'epoch'. #219

hhhhhhluo opened this issue Sep 20, 2023 · 0 comments

Comments

@hhhhhhluo
Copy link

i just set with_mask = False and modified some relavant codes to just do bbox detection without segm.It's works when i just train a model from scratch,but when i try to use the command here:
python train.py mask_rcnn_swin_tiny_patch4_window7_mstrain_480-800_adamw_1x_coco.py --resume-from mask_rcnn_swin_tiny_patch4_window7_1x.pth.
it reports error:
Traceback (most recent call last):
File "D:\dev_proj\Swin-Transformer-Object-Detection-master\train.py", line 188, in
main()
File "D:\dev_proj\Swin-Transformer-Object-Detection-master\train.py", line 177, in main
train_detector(
File "D:\dev_proj\Swin-Transformer-Object-Detection-master\mmdet\apis\train.py", line 182, in train_detector
runner.resume(cfg.resume_from)
File "D:\dev_proj\Swin-Transformer-Object-Detection-master\mmcv_custom\runner\epoch_based_runner.py", line 86, in resume
self._epoch = checkpoint['meta']['epoch']
~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'epoch'

seems like i cant use a pretrained model because i just delete some mask head module in the model,can anyone tell how to fix it so that i can use a pretrained model to improve my model performance.A model without pretrained perfomes really bad in my dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant