Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

KeyError: 'epoch'. #219

Copy link
Copy link
@hhhhhhluo

Description

@hhhhhhluo
Issue body actions

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.