Code release for ConvNeXt model

Overview

A ConvNet for the 2020s

Official PyTorch implementation of ConvNeXt, from the following paper:

A ConvNet for the 2020s. arXiv 2022.
Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell and Saining Xie
Facebook AI Research, UC Berkeley


We propose ConvNeXt, a pure ConvNet model constructed entirely from standard ConvNet modules. ConvNeXt is accurate, efficient, scalable and very simple in design.

Catalog

  • ImageNet-1K Training Code
  • ImageNet-22K Pre-training Code
  • ImageNet-1K Fine-tuning Code
  • Downstream Transfer (Detection, Segmentation) Code

Results and Pre-trained Models

ImageNet-1K trained models

name resolution acc@1 #params FLOPs model
ConvNeXt-T 224x224 82.1 28M 4.5G model
ConvNeXt-S 224x224 83.1 50M 8.7G model
ConvNeXt-B 224x224 83.8 89M 15.4G model
ConvNeXt-B 384x384 85.1 89M 45.0G model
ConvNeXt-L 224x224 84.3 198M 34.4G model
ConvNeXt-L 384x384 85.5 198M 101.0G model

ImageNet-22K trained models

name resolution acc@1 #params FLOPs 22k model 1k model
ConvNeXt-B 224x224 85.8 89M 15.4G model model
ConvNeXt-B 384x384 86.8 89M 47.0G - model
ConvNeXt-L 224x224 86.6 198M 34.4G model model
ConvNeXt-L 384x384 87.5 198M 101.0G - model
ConvNeXt-XL 224x224 87.0 350M 60.9G model model
ConvNeXt-XL 384x384 87.8 350M 179.0G - model

ImageNet-1K trained models (isotropic)

name resolution acc@1 #params FLOPs model
ConvNeXt-S 224x224 78.7 22M 4.3G model
ConvNeXt-B 224x224 82.0 87M 16.9G model
ConvNeXt-L 224x224 82.6 306M 59.7G model

Installation

Please check INSTALL.md for installation instructions.

Evaluation

We give an example evaluation command for a ImageNet-22K pre-trained, then ImageNet-1K fine-tuned ConvNeXt-B:

Single-GPU

python main.py --model convnext_base --eval true \
--resume https://dl.fbaipublicfiles.com/convnext/convnext_base_22k_1k_224.pth \
--input_size 224 --drop_path 0.2 \
--data_path /path/to/imagenet-1k

Multi-GPU

python -m torch.distributed.launch --nproc_per_node=8 main.py \
--model convnext_base --eval true \
--resume https://dl.fbaipublicfiles.com/convnext/convnext_base_22k_1k_224.pth \
--input_size 224 --drop_path 0.2 \
--data_path /path/to/imagenet-1k

This should give

* Acc@1 85.820 Acc@5 97.868 loss 0.563
  • For evaluating other model variants, change --model, --resume, --input_size accordingly. You can get the url to pre-trained models from the tables above.
  • Setting model-specific --drop_path is not strictly required in evaluation, as the DropPath module in timm behaves the same during evaluation; but it is required in training. See TRAINING.md or our paper for the values used for different models.

Training

See TRAINING.md for training and fine-tuning instructions.

Acknowledgement

This repository is built using the timm library, DeiT and BEiT repositories.

License

This project is released under the MIT license. Please see the LICENSE file for more information.

Citation

If you find this repository helpful, please consider citing:

@Article{liu2021convnet,
  author  = {Zhuang Liu and Hanzi Mao and Chao-Yuan Wu and Christoph Feichtenhofer and Trevor Darrell and Saining Xie},
  title   = {A ConvNet for the 2020s},
  journal = {arXiv preprint arXiv:2201.03545},
  year    = {2022},
}
Comments
  • Hello I have an initial problem

    Hello I have an initial problem

    Traceback (most recent call last): File "C:/Users/janice/Desktop/covnet/ConvNeXt-main/main.py", line 477, in main(args) File "C:/Users/janice/Desktop/covnet/ConvNeXt-main/main.py", line 205, in main utils.init_distributed_mode(args) File "C:\Users\janice\Desktop\covnet\ConvNeXt-main\utils.py", line 329, in init_distributed_mode torch.distributed.init_process_group(backend=args.dist_backend, init_method=args.dist_url, File "C:\Users\janice\anaconda3\envs\covnet\lib\site-packages\torch\distributed\distributed_c10d.py", line 503, in init_process_group _update_default_pg(_new_process_group_helper( File "C:\Users\janice\anaconda3\envs\covnet\lib\site-packages\torch\distributed\distributed_c10d.py", line 597, in _new_process_group_helper raise RuntimeError("Distributed package doesn't have NCCL " RuntimeError: Distributed package doesn't have NCCL built in Killing subprocess 14712 Traceback (most recent call last): File "C:\Users\janice\anaconda3\envs\covnet\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\janice\anaconda3\envs\covnet\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\janice\anaconda3\envs\covnet\lib\site-packages\torch\distributed\launch.py", line 340, in main() File "C:\Users\janice\anaconda3\envs\covnet\lib\site-packages\torch\distributed\launch.py", line 326, in main sigkill_handler(signal.SIGTERM, None) # not coming back File "C:\Users\janice\anaconda3\envs\covnet\lib\site-packages\torch\distributed\launch.py", line 301, in sigkill_handler raise subprocess.CalledProcessError(returncode=last_return_code, cmd=cmd) subprocess.CalledProcessError: Command '['C:\Users\janice\anaconda3\envs\covnet\python.exe', '-u', 'C:/Users/janice/Desktop/covnet/ConvNeXt-main/main .py', '--local_rank=0', '--model', 'convnext_tiny', '--drop_path', '0.1', '--batch_size', '128', '--lr', '4e-3', '--update_freq', '4', '--model_ema', 'true ', '--model_ema_eval', 'true', '--data_path', 'C:/Users/janice/Desktop/covnet/train_val_test/training', '--output_dir', 'C:/Users/janice/Desktop/covnet/res ults']' returned non-zero exit status 1.

    I have no idea about this error

    opened by iamwic 12
  • hello,what is this problem,thanks~

    hello,what is this problem,thanks~

    Traceback (most recent call last): File "run_with_submitit.py", line 122, in main() File "run_with_submitit.py", line 113, in main args.dist_url = get_init_file().as_uri() File "run_with_submitit.py", line 41, in get_init_file os.makedirs(str(get_shared_folder()), exist_ok=True) File "run_with_submitit.py", line 37, in get_shared_folder raise RuntimeError("No shared folder available") RuntimeError: No shared folder available

    opened by lxwkobe24 12
  • Add Weights and Biases Integration

    Add Weights and Biases Integration

    This PR adds support for Weights and Biases metric and model checkpointing.

    Usage

    I have tested the implementation by training ConvNext Tiny on CIFAR 100 dataset for 10 epochs. To enable logging metrics using W&B use --enable_wandb true. To save the model checkpoints as versioned artifacts use --wandb_ckpt true along with --enable_wandb.

    python main.py --epochs 10 --model convnext_tiny --data_set CIFAR --data_path datasets --num_workers 8 --warmup_epochs 0  --save_ckpt true --output_dir model_ckpt --finetune path/to/model.pth --cutmix 0 --mixup 0 --lr 4e-4 --enable_wandb true --wandb_ckpt true
    

    You can also set the name of the W&B project where all the runs will be logged using the --project argument (default='convnext').

    Result (Feature Addition)

    • Able to easily share the experiments. Here's an example W&B run that shows train and test metrics from fine-tuning a ConvNext tiny on CIFAR 100 for 10 epochs.
    • Ability to check out the exact configuration used to train the model. Configs can thus be easily compared.
    • CPU/GPU metrics - memory allocated, memory utilized, etc.
    • Versioned model checkpoints which are easy to share.

    Note: I achieved a ~88% test top 1 accuracy which is really impressive. Thanks for working on this.

    The screen recording below summarizes the features being added for a few lines of code.

    https://user-images.githubusercontent.com/31141479/150026875-91e4f38d-f465-49b6-9f12-3c8559c2934a.mov

    Note

    • I have tested the implementation on a single machine with one GPU and with 2 GPUs and seems to work as expected. You can find the W&B run associated with training on 2 K80s.
    • If --enable_wandb true is not passed the code will work as expected, thus the addition is not enforcing any dependency on W&B.
    CLA Signed 
    opened by ayulockin 12
  • 'ConvNeXt is not in the models registry' . How to register the ConvNeXt ,i add the all files to Swin-T ,but did not work

    'ConvNeXt is not in the models registry' . How to register the ConvNeXt ,i add the all files to Swin-T ,but did not work

    custom_hooks = [dict(type='NumClassCheckHook')]
    dist_params = dict(backend='nccl')
    log_level = 'INFO'
    load_from = None
    resume_from = None
    workflow = [('train', 1)]
    classes = ('loose_l', 'loose_s', 'poor_l', 'porous')
    work_dir = './work_dirs\radar_convnext'
    gpu_ids = range(0, 1)
      File "D:\App\anaconda\envs\convnext\lib\site-packages\mmcv\utils\registry.py", line 212, in build
        return self.build_func(*args, **kwargs, registry=self)
      File "D:\App\anaconda\envs\convnext\lib\site-packages\mmcv\cnn\builder.py", line 27, in build_model_from_cfg
        return build_from_cfg(cfg, registry, default_args)
      File "D:\App\anaconda\envs\convnext\lib\site-packages\mmcv\utils\registry.py", line 45, in build_from_cfg
        f'{obj_type} is not in the {registry.name} registry')
    KeyError: 'ConvNeXt is not in the models registry'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "tools/train.py", line 187, in <module>
        main()
      File "tools/train.py", line 161, in main
        test_cfg=cfg.get('test_cfg'))
      File "D:\App\anaconda\envs\convnext\lib\site-packages\mmdet\models\builder.py", line 59, in build_detector
        cfg, default_args=dict(train_cfg=train_cfg, test_cfg=test_cfg))
      File "D:\App\anaconda\envs\convnext\lib\site-packages\mmcv\utils\registry.py", line 212, in build
        return self.build_func(*args, **kwargs, registry=self)
      File "D:\App\anaconda\envs\convnext\lib\site-packages\mmcv\cnn\builder.py", line 27, in build_model_from_cfg
        return build_from_cfg(cfg, registry, default_args)
      File "D:\App\anaconda\envs\convnext\lib\site-packages\mmcv\utils\registry.py", line 55, in build_from_cfg
        raise type(e)(f'{obj_cls.__name__}: {e}')
    KeyError: "CascadeRCNN: 'ConvNeXt is not in the models registry'"
    
    opened by joeyslv 11
  • my model_ema not updat

    my model_ema not updat

    I turned on ema during training,But this operation doesn't seem to work。The model is updated normally, but the ema model is not updated with it.I don't know if I'm missing something.I have tried many times and the ema model will not update image

    opened by TAOSHss 9
  • where are these files:  ./_base_/models/cascade_mask_rcnn_convnext_fpn.py',     '../_base_/datasets/coco_instance.py',     '../_base_/schedules/schedule_1x.py',

    where are these files: ./_base_/models/cascade_mask_rcnn_convnext_fpn.py', '../_base_/datasets/coco_instance.py', '../_base_/schedules/schedule_1x.py',

    where are these files: ./_base_/models/cascade_mask_rcnn_convnext_fpn.py', '../_base_/datasets/coco_instance.py', '../_base_/schedules/schedule_1x.py',

    opened by Williamlizl 9
  • convnext is slower than swin ?

    convnext is slower than swin ?

    I use convnext_tiny as pretrained model to finetune on my own dataset, but i found convnext_tiny is slower than swin_tiny, I use 4 nvidia 1080ti. convnext tiny cost three more times than swin_tiny . But the flops of two model is similar, I don't know why convnext is slower?

    opened by lichun-wang 8
  • The batch-sizes of single machine commands are not adjusted

    The batch-sizes of single machine commands are not adjusted

    On the training doc, I believe we need to adjust the batch-size (or the LR) on the single machine commands to maintain the total batch-size the same.

    For example, currently the ConvNeXt-S reports:

    • Multi-node: --nodes 4 --ngpus 8 --batch_size 128 --lr 4e-3
    • Single-machine: --nproc_per_node=8 --batch_size 128 --lr 4e-3 <- I believe here it should be --batch_size 512

    Same applies for the other variants.

    opened by datumbox 7
  • ConvNeXt-S and ConvNeXt-T models pretrained on ImageNet-22k

    ConvNeXt-S and ConvNeXt-T models pretrained on ImageNet-22k

    Hi, this is certainly great work, and thank you for the contribution!

    Models pretrained on ImageNet-22k outperform the ones without significantly. Wonder whether it's possible for you guys to release the ConvNeXt-S&T models that have been pretrained on ImageNet-22k? If possible, it would motivate lots of on-device downstream tasks to integrate ConvNeXt as the backbone. I've tried the current ImageNet-1k trained models with panoptic segmentation and it works like a charm. ConvNext-S&T pretrained with ImageNet-22k will be greatly appreciated. Thanks!

    opened by CanyonWind 6
  • Speed of the convnext

    Speed of the convnext

    Hello, I recently tried to use the convnext structure for a task that attaches great importance to the inference speed (the faster the better, not a certain speed), the inference speed of convnext is more than twice as slow as 33 convolution, I Just use pytorch for inference, is there any way to improve the speed (can sacrifice a little precision), or if it is written using cudnn, will it narrow the gap with 33 convolution.

    opened by shengkelong 5
  • A question about processing ImageNet-22K dataset

    A question about processing ImageNet-22K dataset

    Thanks for sharing your fantastic work~ I want to know how to process ImageNet-22K dataset that download from ImageNet.org, where can i get data labels?

    opened by peiyingxin 5
  • LayerNorm, what is going on?

    LayerNorm, what is going on?

    Hello!

    I am unsure of what the LayerNorm on images is actually supposed to do. LayerNorm channels first works kinda like BatchNorm2d, however with quite suspicious vertical lines. LayerNorm channels last however completely breaks the image, as each pixel is normalized individually. Is this intended behaviour?

    Please have a look at the experiment below, to understand what I mean.

    Related #112 possibly #115

    import torch
    from torch import nn
    import torchvision
    from models.convnext import LayerNorm
    
    
    img = torchvision.io.read_image("cat.jpg")
    img = img*0.005
    torchvision.utils.save_image(img, "cat0.jpg")
    

    cat

    Batch Norm 2d

    bn = nn.BatchNorm2d(3)
    img_bn = bn(img.unsqueeze(0))[0]
    torchvision.utils.save_image(img_bn*.28+.7, "cat_bn.jpg")
    

    cat_bn

    Layer Norm

    channels first

    ln_cf = LayerNorm(3, data_format="channels_first")
    img_cf = ln_cf(img)
    torchvision.utils.save_image(img_cf*.28+.7, "cat_cf.jpg")
    

    cat_cf

    channels last

    ln_cl = LayerNorm(3, data_format="channels_last")
    img_cl = ln_cl(img.permute(1,2,0)).permute(2,0,1)
    torchvision.utils.save_image(img_cl*.28+.7, "cat_cl.jpg")
    

    cat_cl

    opened by ju-w 1
  • Hyperparameter setting for training from scratch on CIFAR-10

    Hyperparameter setting for training from scratch on CIFAR-10

    Hi,

    I am trying to train a convext on CIFAR-10 for a research project that doesn't allow using BN. I use the following configuration:

    python -m torch.distributed.launch --nproc_per_node=4 main.py \
      --data_set image_folder --data_path ./CIFAR-10-images/train --eval_data_path ./CIFAR-10-images/test \
      --nb_classes 10 --num_workers 8 --warmup_epochs 0 \
      --save_ckpt false \
      --cutmix 0 --mixup 0 \
      --model_ema_eval true \
      --model convnext_tiny \
      --epochs 100 --lr 4e-4 --weight_decay 5e-2 --opt 'sgd' --input_size 32\
      --output_dir results/100epochs_lr_4e-4_wd_5e-2_sgd_inputsize_32 \
    

    And the accuracy is only 75% percent (standard ResNet18 is about 93%). If I change the optimizer from AdamW to SGD, the best accuracy actually drops to below 50%. If I use the default input size 224, the accuracy is 84%, still significantly low.

    Can ConvNeXt work on CIFAR10 without fine-tuning from a pretrained model? Could you provide a recommended set of hyper parameters for CIFAR10 (that should be robust to different types of optimizers and without mix-up and cutmix)?

    Also I have another question on fine-tuning on CIFAR10: it seems that in the colab file the input_size is the default 224. However CIFAR10 image is 32*32. Does this mean that in the data preparation stage the image will be padded to 224 * 224?

    Thank you!

    opened by Yuancheng-Xu 1
  • Error in Convnext training with Swin transformer framework - The testing results of the whole dataset is empty.

    Error in Convnext training with Swin transformer framework - The testing results of the whole dataset is empty.

    Hi,

    I am trying to fine-tune convnext large model on the dataset in coco format, and after solving lot of error i am able to run training by using utils/train.py .

    But i get mmdet - ERROR - The testing results of the whole dataset is empty. when i print out the output, it gives an empty array.

    Since the dataset is strictly detection based , i commented out mask details from the config which now looks like this 👍

    
    
    _base_ = [
        '../_base_/models/cascade_mask_rcnn_convnext_fpn.py',
        ../_base_/datasets/custom_dataset_detection.py',
        '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
    ]
    
    model = dict(
        backbone=dict(
            in_chans=3,
            depths=[3, 3, 27, 3], 
            dims=[192, 384, 768, 1536], 
            drop_path_rate=0.7,
            layer_scale_init_value=1.0,
            out_indices=[0, 1, 2, 3],
        ),
        neck=dict(in_channels=[192, 384, 768, 1536]),
        roi_head=dict(
            bbox_head=[
                dict(
                    type='ConvFCBBoxHead',
                    num_shared_convs=4,
                    num_shared_fcs=1,
                    in_channels=256,
                    conv_out_channels=256,
                    fc_out_channels=1024,
                    roi_feat_size=7,
                    num_classes=97,
                    bbox_coder=dict(
                        type='DeltaXYWHBBoxCoder',
                        target_means=[0., 0., 0., 0.],
                        target_stds=[0.1, 0.1, 0.2, 0.2]),
                    reg_class_agnostic=False,
                    reg_decoded_bbox=True,
                    norm_cfg=dict(type='SyncBN', requires_grad=True),
                    loss_cls=dict(
                        type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
                    loss_bbox=dict(type='GIoULoss', loss_weight=10.0)),
                dict(
                    type='ConvFCBBoxHead',
                    num_shared_convs=4,
                    num_shared_fcs=1,
                    in_channels=256,
                    conv_out_channels=256,
                    fc_out_channels=1024,
                    roi_feat_size=7,
                    num_classes=97,
                    bbox_coder=dict(
                        type='DeltaXYWHBBoxCoder',
                        target_means=[0., 0., 0., 0.],
                        target_stds=[0.05, 0.05, 0.1, 0.1]),
                    reg_class_agnostic=False,
                    reg_decoded_bbox=True,
                    norm_cfg=dict(type='SyncBN', requires_grad=True),
                    loss_cls=dict(
                        type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
                    loss_bbox=dict(type='GIoULoss', loss_weight=10.0)),
                dict(
                    type='ConvFCBBoxHead',
                    num_shared_convs=4,
                    num_shared_fcs=1,
                    in_channels=256,
                    conv_out_channels=256,
                    fc_out_channels=1024,
                    roi_feat_size=7,
                    num_classes=97,
                    bbox_coder=dict(
                        type='DeltaXYWHBBoxCoder',
                        target_means=[0., 0., 0., 0.],
                        target_stds=[0.033, 0.033, 0.067, 0.067]),
                    reg_class_agnostic=False,
                    reg_decoded_bbox=True,
                    norm_cfg=dict(type='SyncBN', requires_grad=True),
                    loss_cls=dict(
                        type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
                    loss_bbox=dict(type='GIoULoss', loss_weight=10.0))
            ]))
    
    img_norm_cfg = dict(
        mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
    
    # augmentation strategy originates from DETR / Sparse RCNN
    train_pipeline = [
        dict(type='LoadImageFromFile'),
        dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
        dict(type='RandomFlip', flip_ratio=0.5),
        dict(type='AutoAugment',
             policies=[
                 [
                     dict(type='Resize',
                          img_scale=[(480, 1333), (512, 1333), (544, 1333), (576, 1333),
                                     (608, 1333), (640, 1333), (672, 1333), (704, 1333),
                                     (736, 1333), (768, 1333), (800, 1333)],
                          multiscale_mode='value',
                          keep_ratio=True)
                 ],
                 [
                     dict(type='Resize',
                          img_scale=[(400, 1333), (500, 1333), (600, 1333)],
                          multiscale_mode='value',
                          keep_ratio=True),
                     dict(type='RandomCrop',
                          crop_type='absolute_range',
                          crop_size=(384, 600),
                          allow_negative_crop=True),
                     dict(type='Resize',
                          img_scale=[(480, 1333), (512, 1333), (544, 1333),
                                     (576, 1333), (608, 1333), (640, 1333),
                                     (672, 1333), (704, 1333), (736, 1333),
                                     (768, 1333), (800, 1333)],
                          multiscale_mode='value',
                          override=True,
                          keep_ratio=True)
                 ]
             ]),
        dict(type='Normalize', **img_norm_cfg),
        dict(type='Pad', size_divisor=32),
        dict(type='DefaultFormatBundle'),
        dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
    ]
    data = dict(train=dict(pipeline=train_pipeline))
    
    optimizer = dict(constructor='LearningRateDecayOptimizerConstructor', _delete_=True, type='AdamW', 
                     lr=0.0000002, betas=(0.9, 0.999), weight_decay=0.05,
                     paramwise_cfg={'decay_rate': 0.7,
                                    'decay_type': 'layer_wise',
                                    'num_layers': 12})
    lr_config = dict(step=[3, 9, 27, 33])
    runner = dict(type='EpochBasedRunnerAmp', max_epochs=36)
    
    # do not use mmdet version fp16
    fp16 = None
    optimizer_config = dict(
        type="DistOptimizerHook",
        update_interval=1,
        grad_clip=None,
        coalesce=True,
        bucket_size_mb=-1,
        use_fp16=False,
    )
    
    

    And the corresponsing base/models/cascade_mask_rcnn_convnext_fpn.py config looks like :

    # Copyright (c) Meta Platforms, Inc. and affiliates.
    
    # All rights reserved.
    
    # This source code is licensed under the license found in the
    # LICENSE file in the root directory of this source tree.
    
    
    # model settings
    model = dict(
        type='CascadeRCNN',
        pretrained='checkpoint/cascade_mask_rcnn_convnext_large_22k_3x.pth',
        backbone=dict(
            type='ConvNeXt',
            in_chans=3,
            depths=[3, 3, 9, 3], 
            dims=[96, 192, 384, 768], 
            drop_path_rate=0.2,
            layer_scale_init_value=1e-6,
            out_indices=[0, 1, 2, 3],
        ),
        neck=dict(
            type='FPN',
            in_channels=[128, 256, 512, 1024],
            out_channels=256,
            num_outs=5),
        rpn_head=dict(
            type='RPNHead',
            in_channels=256,
            feat_channels=256,
            anchor_generator=dict(
                type='AnchorGenerator',
                scales=[8],
                ratios=[0.5, 1.0, 2.0],
                strides=[4, 8, 16, 32, 64]),
            bbox_coder=dict(
                type='DeltaXYWHBBoxCoder',
                target_means=[.0, .0, .0, .0],
                target_stds=[1.0, 1.0, 1.0, 1.0]),
            loss_cls=dict(
                type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
            loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
        roi_head=dict(
            type='CascadeRoIHead',
            num_stages=3,
            stage_loss_weights=[1, 0.5, 0.25],
            bbox_roi_extractor=dict(
                type='SingleRoIExtractor',
                roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
                out_channels=256,
                featmap_strides=[4, 8, 16, 32]),
            bbox_head=[
                dict(
                    type='Shared2FCBBoxHead',
                    in_channels=256,
                    fc_out_channels=1024,
                    roi_feat_size=7,
                    num_classes=97,
                    bbox_coder=dict(
                        type='DeltaXYWHBBoxCoder',
                        target_means=[0., 0., 0., 0.],
                        target_stds=[0.1, 0.1, 0.2, 0.2]),
                    reg_class_agnostic=True,
                    loss_cls=dict(
                        type='CrossEntropyLoss',
                        use_sigmoid=False,
                        loss_weight=1.0),
                    loss_bbox=dict(type='SmoothL1Loss', beta=1.0,
                                   loss_weight=1.0)),
                dict(
                    type='Shared2FCBBoxHead',
                    in_channels=256,
                    fc_out_channels=1024,
                    roi_feat_size=7,
                    num_classes=97,
                    bbox_coder=dict(
                        type='DeltaXYWHBBoxCoder',
                        target_means=[0., 0., 0., 0.],
                        target_stds=[0.05, 0.05, 0.1, 0.1]),
                    reg_class_agnostic=True,
                    loss_cls=dict(
                        type='CrossEntropyLoss',
                        use_sigmoid=False,
                        loss_weight=1.0),
                    loss_bbox=dict(type='SmoothL1Loss', beta=1.0,
                                   loss_weight=1.0)),
                dict(
                    type='Shared2FCBBoxHead',
                    in_channels=256,
                    fc_out_channels=1024,
                    roi_feat_size=7,
                    num_classes=97,
                    bbox_coder=dict(
                        type='DeltaXYWHBBoxCoder',
                        target_means=[0., 0., 0., 0.],
                        target_stds=[0.033, 0.033, 0.067, 0.067]),
                    reg_class_agnostic=True,
                    loss_cls=dict(
                        type='CrossEntropyLoss',
                        use_sigmoid=False,
                        loss_weight=1.0),
                    loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))
            ]),
        # model training and testing settings
        train_cfg = dict(
            rpn=dict(
                assigner=dict(
                    type='MaxIoUAssigner',
                    pos_iou_thr=0.7,
                    neg_iou_thr=0.3,
                    min_pos_iou=0.3,
                    match_low_quality=True,
                    ignore_iof_thr=-1),
                sampler=dict(
                    type='RandomSampler',
                    num=256,
                    pos_fraction=0.5,
                    neg_pos_ub=-1,
                    add_gt_as_proposals=False),
                allowed_border=0,
                pos_weight=-1,
                debug=False),
            rpn_proposal=dict(
                nms_across_levels=False,
                nms_pre=2000,
                nms_post=2000,
                max_per_img=2000,
                nms=dict(type='nms', iou_threshold=0.7),
                min_bbox_size=0),
            rcnn=[
                dict(
                    assigner=dict(
                        type='MaxIoUAssigner',
                        pos_iou_thr=0.5,
                        neg_iou_thr=0.5,
                        min_pos_iou=0.5,
                        match_low_quality=False,
                        ignore_iof_thr=-1),
                    sampler=dict(
                        type='RandomSampler',
                        num=512,
                        pos_fraction=0.25,
                        neg_pos_ub=-1,
                        add_gt_as_proposals=True),
                    #mask_size=28,
                    pos_weight=-1,
                    debug=False),
                dict(
                    assigner=dict(
                        type='MaxIoUAssigner',
                        pos_iou_thr=0.6,
                        neg_iou_thr=0.6,
                        min_pos_iou=0.6,
                        match_low_quality=False,
                        ignore_iof_thr=-1),
                    sampler=dict(
                        type='RandomSampler',
                        num=512,
                        pos_fraction=0.25,
                        neg_pos_ub=-1,
                        add_gt_as_proposals=True),
                    #mask_size=28,
                    pos_weight=-1,
                    debug=False),
                dict(
                    assigner=dict(
                        type='MaxIoUAssigner',
                        pos_iou_thr=0.7,
                        neg_iou_thr=0.7,
                        min_pos_iou=0.7,
                        match_low_quality=False,
                        ignore_iof_thr=-1),
                    sampler=dict(
                        type='RandomSampler',
                        num=512,
                        pos_fraction=0.25,
                        neg_pos_ub=-1,
                        add_gt_as_proposals=True),
                    #mask_size=28,
                    pos_weight=-1,
                    debug=False)
            ]),
        test_cfg = dict(
            rpn=dict(
                nms_across_levels=False,
                nms_pre=1000,
                nms_post=1000,
                max_per_img=1000,
                nms=dict(type='nms', iou_threshold=0.7),
                min_bbox_size=0),
            rcnn=dict(
                score_thr=0.05,
                nms=dict(type='nms', iou_threshold=0.5),
                max_per_img=100)))
    
    

    Do i need to prune or update some layer's information for which i am getting below error :

    unexpected key in source state_dict: backbone.downsample_layers.0.0.weight, backbone.downsample_layers.0.0.bias, backbone.downsample_layers.0.1.weight, backbone.downsample_layers.0.1.bias, backbone.downsample_layers.1.0.weight, backbone.downsample_layers.1.0.bias, backbone.downsample_layers.1.1.weight, backbone.downsample_layers.1.1.bias, backbone.downsample_layers.2.0.weight, backbone.downsample_layers.2.0.bias, backbone.downsample_layers.2.1.weight, backbone.downsample_layers.2.1.bias, backbone.downsample_layers.3.0.weight, backbone.downsample_layers.3.0.bias, backbone.downsample_layers.3.1.weight, backbone.downsample_layers.3.1.bias, backbone.stages.0.0.gamma, backbone.stages.0.0.dwconv.weight, backbone.stages.0.0.dwconv.bias, backbone.stages.0.0.norm.weight, backbone.stages.0.0.norm.bias, backbone.stages.0.0.pwconv1.weight, backbone.stages.0.0.pwconv1.bias, backbone.stages.0.0.pwconv2.weight, backbone.stages.0.0.pwconv2.bias, backbone.stages.0.1.gamma, backbone.stages.0.1.dwconv.weight, backbone.stages.0.1.dwconv.bias, backbone.stages.0.1.norm.weight, backbone.stages.0.1.norm.bias, backbone.stages.0.1.pwconv1.weight, backbone.stages.0.1.pwconv1.bias, backbone.stages.0.1.pwconv2.weight, backbone.stages.0.1.pwconv2.bias, backbone.stages.0.2.gamma, backbone.stages.0.2.dwconv.weight, backbone.stages.0.2.dwconv.bias, backbone.stages.0.2.norm.weight, backbone.stages.0.2.norm.bias, backbone.stages.0.2.pwconv1.weight, backbone.stages.0.2.pwconv1.bias, backbone.stages.0.2.pwconv2.weight, backbone.stages.0.2.pwconv2.bias, backbone.stages.1.0.gamma, backbone.stages.1.0.dwconv.weight, backbone.stages.1.0.dwconv.bias, backbone.stages.1.0.norm.weight, backbone.stages.1.0.norm.bias, backbone.stages.1.0.pwconv1.weight, backbone.stages.1.0.pwconv1.bias, backbone.stages.1.0.pwconv2.weight, backbone.stages.1.0.pwconv2.bias, backbone.stages.1.1.gamma, backbone.stages.1.1.dwconv.weight, backbone.stages.1.1.dwconv.bias, backbone.stages.1.1.norm.weight, backbone.stages.1.1.norm.bias, backbone.stages.1.1.pwconv1.weight, backbone.stages.1.1.pwconv1.bias, backbone.stages.1.1.pwconv2.weight, backbone.stages.1.1.pwconv2.bias, backbone.stages.1.2.gamma, backbone.stages.1.2.dwconv.weight, backbone.stages.1.2.dwconv.bias, backbone.stages.1.2.norm.weight, backbone.stages.1.2.norm.bias, backbone.stages.1.2.pwconv1.weight, backbone.stages.1.2.pwconv1.bias, backbone.stages.1.2.pwconv2.weight, backbone.stages.1.2.pwconv2.bias, backbone.stages.2.0.gamma, backbone.stages.2.0.dwconv.weight, backbone.stages.2.0.dwconv.bias, backbone.stages.2.0.norm.weight, backbone.stages.2.0.norm.bias, backbone.stages.2.0.pwconv1.weight, backbone.stages.2.0.pwconv1.bias, backbone.stages.2.0.pwconv2.weight, backbone.stages.2.0.pwconv2.bias, backbone.stages.2.1.gamma, backbone.stages.2.1.dwconv.weight, backbone.stages.2.1.dwconv.bias, backbone.stages.2.1.norm.weight, backbone.stages.2.1.norm.bias, backbone.stages.2.1.pwconv1.weight, backbone.stages.2.1.pwconv1.bias, backbone.stages.2.1.pwconv2.weight, backbone.stages.2.1.pwconv2.bias, backbone.stages.2.2.gamma, backbone.stages.2.2.dwconv.weight, backbone.stages.2.2.dwconv.bias, backbone.stages.2.2.norm.weight, backbone.stages.2.2.norm.bias, backbone.stages.2.2.pwconv1.weight, backbone.stages.2.2.pwconv1.bias, backbone.stages.2.2.pwconv2.weight, backbone.stages.2.2.pwconv2.bias, backbone.stages.2.3.gamma, backbone.stages.2.3.dwconv.weight, backbone.stages.2.3.dwconv.bias, backbone.stages.2.3.norm.weight, backbone.stages.2.3.norm.bias, backbone.stages.2.3.pwconv1.weight, backbone.stages.2.3.pwconv1.bias, backbone.stages.2.3.pwconv2.weight, backbone.stages.2.3.pwconv2.bias, backbone.stages.2.4.gamma, backbone.stages.2.4.dwconv.weight, backbone.stages.2.4.dwconv.bias, backbone.stages.2.4.norm.weight, backbone.stages.2.4.norm.bias, backbone.stages.2.4.pwconv1.weight, backbone.stages.2.4.pwconv1.bias, backbone.stages.2.4.pwconv2.weight, backbone.stages.2.4.pwconv2.bias, backbone.stages.2.5.gamma, backbone.stages.2.5.dwconv.weight, backbone.stages.2.5.dwconv.bias, backbone.stages.2.5.norm.weight, backbone.stages.2.5.norm.bias, backbone.stages.2.5.pwconv1.weight, backbone.stages.2.5.pwconv1.bias, backbone.stages.2.5.pwconv2.weight, backbone.stages.2.5.pwconv2.bias, backbone.stages.2.6.gamma, backbone.stages.2.6.dwconv.weight, backbone.stages.2.6.dwconv.bias, backbone.stages.2.6.norm.weight, backbone.stages.2.6.norm.bias, backbone.stages.2.6.pwconv1.weight, backbone.stages.2.6.pwconv1.bias, backbone.stages.2.6.pwconv2.weight, backbone.stages.2.6.pwconv2.bias, backbone.stages.2.7.gamma, backbone.stages.2.7.dwconv.weight, backbone.stages.2.7.dwconv.bias, backbone.stages.2.7.norm.weight, backbone.stages.2.7.norm.bias, backbone.stages.2.7.pwconv1.weight, backbone.stages.2.7.pwconv1.bias, backbone.stages.2.7.pwconv2.weight, backbone.stages.2.7.pwconv2.bias, backbone.stages.2.8.gamma, backbone.stages.2.8.dwconv.weight, backbone.stages.2.8.dwconv.bias, backbone.stages.2.8.norm.weight, backbone.stages.2.8.norm.bias, backbone.stages.2.8.pwconv1.weight, backbone.stages.2.8.pwconv1.bias, backbone.stages.2.8.pwconv2.weight, backbone.stages.2.8.pwconv2.bias, backbone.stages.2.9.gamma, backbone.stages.2.9.dwconv.weight, backbone.stages.2.9.dwconv.bias, backbone.stages.2.9.norm.weight, backbone.stages.2.9.norm.bias, backbone.stages.2.9.pwconv1.weight, backbone.stages.2.9.pwconv1.bias, backbone.stages.2.9.pwconv2.weight, backbone.stages.2.9.pwconv2.bias, backbone.stages.2.10.gamma, backbone.stages.2.10.dwconv.weight, backbone.stages.2.10.dwconv.bias, backbone.stages.2.10.norm.weight, backbone.stages.2.10.norm.bias, backbone.stages.2.10.pwconv1.weight, backbone.stages.2.10.pwconv1.bias, backbone.stages.2.10.pwconv2.weight, backbone.stages.2.10.pwconv2.bias, backbone.stages.2.11.gamma, backbone.stages.2.11.dwconv.weight, backbone.stages.2.11.dwconv.bias, backbone.stages.2.11.norm.weight, backbone.stages.2.11.norm.bias, backbone.stages.2.11.pwconv1.weight, backbone.stages.2.11.pwconv1.bias, backbone.stages.2.11.pwconv2.weight, backbone.stages.2.11.pwconv2.bias, backbone.stages.2.12.gamma, backbone.stages.2.12.dwconv.weight, backbone.stages.2.12.dwconv.bias, backbone.stages.2.12.norm.weight, backbone.stages.2.12.norm.bias, backbone.stages.2.12.pwconv1.weight, backbone.stages.2.12.pwconv1.bias, backbone.stages.2.12.pwconv2.weight, backbone.stages.2.12.pwconv2.bias, backbone.stages.2.13.gamma, backbone.stages.2.13.dwconv.weight, backbone.stages.2.13.dwconv.bias, backbone.stages.2.13.norm.weight, backbone.stages.2.13.norm.bias, backbone.stages.2.13.pwconv1.weight, backbone.stages.2.13.pwconv1.bias, backbone.stages.2.13.pwconv2.weight, backbone.stages.2.13.pwconv2.bias, backbone.stages.2.14.gamma, backbone.stages.2.14.dwconv.weight, backbone.stages.2.14.dwconv.bias, backbone.stages.2.14.norm.weight, backbone.stages.2.14.norm.bias, backbone.stages.2.14.pwconv1.weight, backbone.stages.2.14.pwconv1.bias, backbone.stages.2.14.pwconv2.weight, backbone.stages.2.14.pwconv2.bias, backbone.stages.2.15.gamma, backbone.stages.2.15.dwconv.weight, backbone.stages.2.15.dwconv.bias, backbone.stages.2.15.norm.weight, backbone.stages.2.15.norm.bias, backbone.stages.2.15.pwconv1.weight, backbone.stages.2.15.pwconv1.bias, backbone.stages.2.15.pwconv2.weight, backbone.stages.2.15.pwconv2.bias, backbone.stages.2.16.gamma, backbone.stages.2.16.dwconv.weight, backbone.stages.2.16.dwconv.bias, backbone.stages.2.16.norm.weight, backbone.stages.2.16.norm.bias, backbone.stages.2.16.pwconv1.weight, backbone.stages.2.16.pwconv1.bias, backbone.stages.2.16.pwconv2.weight, backbone.stages.2.16.pwconv2.bias, backbone.stages.2.17.gamma, backbone.stages.2.17.dwconv.weight, backbone.stages.2.17.dwconv.bias, backbone.stages.2.17.norm.weight, backbone.stages.2.17.norm.bias, backbone.stages.2.17.pwconv1.weight, backbone.stages.2.17.pwconv1.bias, backbone.stages.2.17.pwconv2.weight, backbone.stages.2.17.pwconv2.bias, backbone.stages.2.18.gamma, backbone.stages.2.18.dwconv.weight, backbone.stages.2.18.dwconv.bias, backbone.stages.2.18.norm.weight, backbone.stages.2.18.norm.bias, backbone.stages.2.18.pwconv1.weight, backbone.stages.2.18.pwconv1.bias, backbone.stages.2.18.pwconv2.weight, backbone.stages.2.18.pwconv2.bias, backbone.stages.2.19.gamma, backbone.stages.2.19.dwconv.weight, backbone.stages.2.19.dwconv.bias, backbone.stages.2.19.norm.weight, backbone.stages.2.19.norm.bias, backbone.stages.2.19.pwconv1.weight, backbone.stages.2.19.pwconv1.bias, backbone.stages.2.19.pwconv2.weight, backbone.stages.2.19.pwconv2.bias, backbone.stages.2.20.gamma, backbone.stages.2.20.dwconv.weight, backbone.stages.2.20.dwconv.bias, backbone.stages.2.20.norm.weight, backbone.stages.2.20.norm.bias, backbone.stages.2.20.pwconv1.weight, backbone.stages.2.20.pwconv1.bias, backbone.stages.2.20.pwconv2.weight, backbone.stages.2.20.pwconv2.bias, backbone.stages.2.21.gamma, backbone.stages.2.21.dwconv.weight, backbone.stages.2.21.dwconv.bias, backbone.stages.2.21.norm.weight, backbone.stages.2.21.norm.bias, backbone.stages.2.21.pwconv1.weight, backbone.stages.2.21.pwconv1.bias, backbone.stages.2.21.pwconv2.weight, backbone.stages.2.21.pwconv2.bias, backbone.stages.2.22.gamma, backbone.stages.2.22.dwconv.weight, backbone.stages.2.22.dwconv.bias, backbone.stages.2.22.norm.weight, backbone.stages.2.22.norm.bias, backbone.stages.2.22.pwconv1.weight, backbone.stages.2.22.pwconv1.bias, backbone.stages.2.22.pwconv2.weight, backbone.stages.2.22.pwconv2.bias, backbone.stages.2.23.gamma, backbone.stages.2.23.dwconv.weight, backbone.stages.2.23.dwconv.bias, backbone.stages.2.23.norm.weight, backbone.stages.2.23.norm.bias, backbone.stages.2.23.pwconv1.weight, backbone.stages.2.23.pwconv1.bias, backbone.stages.2.23.pwconv2.weight, backbone.stages.2.23.pwconv2.bias, backbone.stages.2.24.gamma, backbone.stages.2.24.dwconv.weight, backbone.stages.2.24.dwconv.bias, backbone.stages.2.24.norm.weight, backbone.stages.2.24.norm.bias, backbone.stages.2.24.pwconv1.weight, backbone.stages.2.24.pwconv1.bias, backbone.stages.2.24.pwconv2.weight, backbone.stages.2.24.pwconv2.bias, backbone.stages.2.25.gamma, backbone.stages.2.25.dwconv.weight, backbone.stages.2.25.dwconv.bias, backbone.stages.2.25.norm.weight, backbone.stages.2.25.norm.bias, backbone.stages.2.25.pwconv1.weight, backbone.stages.2.25.pwconv1.bias, backbone.stages.2.25.pwconv2.weight, backbone.stages.2.25.pwconv2.bias, backbone.stages.2.26.gamma, backbone.stages.2.26.dwconv.weight, backbone.stages.2.26.dwconv.bias, backbone.stages.2.26.norm.weight, backbone.stages.2.26.norm.bias, backbone.stages.2.26.pwconv1.weight, backbone.stages.2.26.pwconv1.bias, backbone.stages.2.26.pwconv2.weight, backbone.stages.2.26.pwconv2.bias, backbone.stages.3.0.gamma, backbone.stages.3.0.dwconv.weight, backbone.stages.3.0.dwconv.bias, backbone.stages.3.0.norm.weight, backbone.stages.3.0.norm.bias, backbone.stages.3.0.pwconv1.weight, backbone.stages.3.0.pwconv1.bias, backbone.stages.3.0.pwconv2.weight, backbone.stages.3.0.pwconv2.bias, backbone.stages.3.1.gamma, backbone.stages.3.1.dwconv.weight, backbone.stages.3.1.dwconv.bias, backbone.stages.3.1.norm.weight, backbone.stages.3.1.norm.bias, backbone.stages.3.1.pwconv1.weight, backbone.stages.3.1.pwconv1.bias, backbone.stages.3.1.pwconv2.weight, backbone.stages.3.1.pwconv2.bias, backbone.stages.3.2.gamma, backbone.stages.3.2.dwconv.weight, backbone.stages.3.2.dwconv.bias, backbone.stages.3.2.norm.weight, backbone.stages.3.2.norm.bias, backbone.stages.3.2.pwconv1.weight, backbone.stages.3.2.pwconv1.bias, backbone.stages.3.2.pwconv2.weight, backbone.stages.3.2.pwconv2.bias, backbone.norm0.weight, backbone.norm0.bias, backbone.norm1.weight, backbone.norm1.bias, backbone.norm2.weight, backbone.norm2.bias, backbone.norm3.weight, backbone.norm3.bias, neck.lateral_convs.0.conv.weight, neck.lateral_convs.0.conv.bias, neck.lateral_convs.1.conv.weight, neck.lateral_convs.1.conv.bias, neck.lateral_convs.2.conv.weight, neck.lateral_convs.2.conv.bias, neck.lateral_convs.3.conv.weight, neck.lateral_convs.3.conv.bias, neck.fpn_convs.0.conv.weight, neck.fpn_convs.0.conv.bias, neck.fpn_convs.1.conv.weight, neck.fpn_convs.1.conv.bias, neck.fpn_convs.2.conv.weight, neck.fpn_convs.2.conv.bias, neck.fpn_convs.3.conv.weight, neck.fpn_convs.3.conv.bias, rpn_head.rpn_conv.weight, rpn_head.rpn_conv.bias, rpn_head.rpn_cls.weight, rpn_head.rpn_cls.bias, rpn_head.rpn_reg.weight, rpn_head.rpn_reg.bias, roi_head.bbox_head.0.fc_cls.weight, roi_head.bbox_head.0.fc_cls.bias, roi_head.bbox_head.0.fc_reg.weight, roi_head.bbox_head.0.fc_reg.bias, roi_head.bbox_head.0.shared_convs.0.conv.weight, roi_head.bbox_head.0.shared_convs.0.bn.weight, roi_head.bbox_head.0.shared_convs.0.bn.bias, roi_head.bbox_head.0.shared_convs.0.bn.running_mean, roi_head.bbox_head.0.shared_convs.0.bn.running_var, roi_head.bbox_head.0.shared_convs.0.bn.num_batches_tracked, roi_head.bbox_head.0.shared_convs.1.conv.weight, roi_head.bbox_head.0.shared_convs.1.bn.weight, roi_head.bbox_head.0.shared_convs.1.bn.bias, roi_head.bbox_head.0.shared_convs.1.bn.running_mean, roi_head.bbox_head.0.shared_convs.1.bn.running_var, roi_head.bbox_head.0.shared_convs.1.bn.num_batches_tracked, roi_head.bbox_head.0.shared_convs.2.conv.weight, roi_head.bbox_head.0.shared_convs.2.bn.weight, roi_head.bbox_head.0.shared_convs.2.bn.bias, roi_head.bbox_head.0.shared_convs.2.bn.running_mean, roi_head.bbox_head.0.shared_convs.2.bn.running_var, roi_head.bbox_head.0.shared_convs.2.bn.num_batches_tracked, roi_head.bbox_head.0.shared_convs.3.conv.weight, roi_head.bbox_head.0.shared_convs.3.bn.weight, roi_head.bbox_head.0.shared_convs.3.bn.bias, roi_head.bbox_head.0.shared_convs.3.bn.running_mean, roi_head.bbox_head.0.shared_convs.3.bn.running_var, roi_head.bbox_head.0.shared_convs.3.bn.num_batches_tracked, roi_head.bbox_head.0.shared_fcs.0.weight, roi_head.bbox_head.0.shared_fcs.0.bias, roi_head.bbox_head.1.fc_cls.weight, roi_head.bbox_head.1.fc_cls.bias, roi_head.bbox_head.1.fc_reg.weight, roi_head.bbox_head.1.fc_reg.bias, roi_head.bbox_head.1.shared_convs.0.conv.weight, roi_head.bbox_head.1.shared_convs.0.bn.weight, roi_head.bbox_head.1.shared_convs.0.bn.bias, roi_head.bbox_head.1.shared_convs.0.bn.running_mean, roi_head.bbox_head.1.shared_convs.0.bn.running_var, roi_head.bbox_head.1.shared_convs.0.bn.num_batches_tracked, roi_head.bbox_head.1.shared_convs.1.conv.weight, roi_head.bbox_head.1.shared_convs.1.bn.weight, roi_head.bbox_head.1.shared_convs.1.bn.bias, roi_head.bbox_head.1.shared_convs.1.bn.running_mean, roi_head.bbox_head.1.shared_convs.1.bn.running_var, roi_head.bbox_head.1.shared_convs.1.bn.num_batches_tracked, roi_head.bbox_head.1.shared_convs.2.conv.weight, roi_head.bbox_head.1.shared_convs.2.bn.weight, roi_head.bbox_head.1.shared_convs.2.bn.bias, roi_head.bbox_head.1.shared_convs.2.bn.running_mean, roi_head.bbox_head.1.shared_convs.2.bn.running_var, roi_head.bbox_head.1.shared_convs.2.bn.num_batches_tracked, roi_head.bbox_head.1.shared_convs.3.conv.weight, roi_head.bbox_head.1.shared_convs.3.bn.weight, roi_head.bbox_head.1.shared_convs.3.bn.bias, roi_head.bbox_head.1.shared_convs.3.bn.running_mean, roi_head.bbox_head.1.shared_convs.3.bn.running_var, roi_head.bbox_head.1.shared_convs.3.bn.num_batches_tracked, roi_head.bbox_head.1.shared_fcs.0.weight, roi_head.bbox_head.1.shared_fcs.0.bias, roi_head.bbox_head.2.fc_cls.weight, roi_head.bbox_head.2.fc_cls.bias, roi_head.bbox_head.2.fc_reg.weight, roi_head.bbox_head.2.fc_reg.bias, roi_head.bbox_head.2.shared_convs.0.conv.weight, roi_head.bbox_head.2.shared_convs.0.bn.weight, roi_head.bbox_head.2.shared_convs.0.bn.bias, roi_head.bbox_head.2.shared_convs.0.bn.running_mean, roi_head.bbox_head.2.shared_convs.0.bn.running_var, roi_head.bbox_head.2.shared_convs.0.bn.num_batches_tracked, roi_head.bbox_head.2.shared_convs.1.conv.weight, roi_head.bbox_head.2.shared_convs.1.bn.weight, roi_head.bbox_head.2.shared_convs.1.bn.bias, roi_head.bbox_head.2.shared_convs.1.bn.running_mean, roi_head.bbox_head.2.shared_convs.1.bn.running_var, roi_head.bbox_head.2.shared_convs.1.bn.num_batches_tracked, roi_head.bbox_head.2.shared_convs.2.conv.weight, roi_head.bbox_head.2.shared_convs.2.bn.weight, roi_head.bbox_head.2.shared_convs.2.bn.bias, roi_head.bbox_head.2.shared_convs.2.bn.running_mean, roi_head.bbox_head.2.shared_convs.2.bn.running_var, roi_head.bbox_head.2.shared_convs.2.bn.num_batches_tracked, roi_head.bbox_head.2.shared_convs.3.conv.weight, roi_head.bbox_head.2.shared_convs.3.bn.weight, roi_head.bbox_head.2.shared_convs.3.bn.bias, roi_head.bbox_head.2.shared_convs.3.bn.running_mean, roi_head.bbox_head.2.shared_convs.3.bn.running_var, roi_head.bbox_head.2.shared_convs.3.bn.num_batches_tracked, roi_head.bbox_head.2.shared_fcs.0.weight, roi_head.bbox_head.2.shared_fcs.0.bias, roi_head.mask_head.0.convs.0.conv.weight, roi_head.mask_head.0.convs.0.conv.bias, roi_head.mask_head.0.convs.1.conv.weight, roi_head.mask_head.0.convs.1.conv.bias, roi_head.mask_head.0.convs.2.conv.weight, roi_head.mask_head.0.convs.2.conv.bias, roi_head.mask_head.0.convs.3.conv.weight, roi_head.mask_head.0.convs.3.conv.bias, roi_head.mask_head.0.upsample.weight, roi_head.mask_head.0.upsample.bias, roi_head.mask_head.0.conv_logits.weight, roi_head.mask_head.0.conv_logits.bias, roi_head.mask_head.1.convs.0.conv.weight, roi_head.mask_head.1.convs.0.conv.bias, roi_head.mask_head.1.convs.1.conv.weight, roi_head.mask_head.1.convs.1.conv.bias, roi_head.mask_head.1.convs.2.conv.weight, roi_head.mask_head.1.convs.2.conv.bias, roi_head.mask_head.1.convs.3.conv.weight, roi_head.mask_head.1.convs.3.conv.bias, roi_head.mask_head.1.upsample.weight, roi_head.mask_head.1.upsample.bias, roi_head.mask_head.1.conv_logits.weight, roi_head.mask_head.1.conv_logits.bias, roi_head.mask_head.2.convs.0.conv.weight, roi_head.mask_head.2.convs.0.conv.bias, roi_head.mask_head.2.convs.1.conv.weight, roi_head.mask_head.2.convs.1.conv.bias, roi_head.mask_head.2.convs.2.conv.weight, roi_head.mask_head.2.convs.2.conv.bias, roi_head.mask_head.2.convs.3.conv.weight, roi_head.mask_head.2.convs.3.conv.bias, roi_head.mask_head.2.upsample.weight, roi_head.mask_head.2.upsample.bias, roi_head.mask_head.2.conv_logits.weight, roi_head.mask_head.2.conv_logits.bias

    missing keys in source state_dict: downsample_layers.0.0.weight, downsample_layers.0.0.bias, downsample_layers.0.1.weight, downsample_layers.0.1.bias, downsample_layers.1.0.weight, downsample_layers.1.0.bias, downsample_layers.1.1.weight, downsample_layers.1.1.bias, downsample_layers.2.0.weight, downsample_layers.2.0.bias, downsample_layers.2.1.weight, downsample_layers.2.1.bias, downsample_layers.3.0.weight, downsample_layers.3.0.bias, downsample_layers.3.1.weight, downsample_layers.3.1.bias, stages.0.0.gamma, stages.0.0.dwconv.weight, stages.0.0.dwconv.bias, stages.0.0.norm.weight, stages.0.0.norm.bias, stages.0.0.pwconv1.weight, stages.0.0.pwconv1.bias, stages.0.0.pwconv2.weight, stages.0.0.pwconv2.bias, stages.0.1.gamma, stages.0.1.dwconv.weight, stages.0.1.dwconv.bias, stages.0.1.norm.weight, stages.0.1.norm.bias, stages.0.1.pwconv1.weight, stages.0.1.pwconv1.bias, stages.0.1.pwconv2.weight, stages.0.1.pwconv2.bias, stages.0.2.gamma, stages.0.2.dwconv.weight, stages.0.2.dwconv.bias, stages.0.2.norm.weight, stages.0.2.norm.bias, stages.0.2.pwconv1.weight, stages.0.2.pwconv1.bias, stages.0.2.pwconv2.weight, stages.0.2.pwconv2.bias, stages.1.0.gamma, stages.1.0.dwconv.weight, stages.1.0.dwconv.bias, stages.1.0.norm.weight, stages.1.0.norm.bias, stages.1.0.pwconv1.weight, stages.1.0.pwconv1.bias, stages.1.0.pwconv2.weight, stages.1.0.pwconv2.bias, stages.1.1.gamma, stages.1.1.dwconv.weight, stages.1.1.dwconv.bias, stages.1.1.norm.weight, stages.1.1.norm.bias, stages.1.1.pwconv1.weight, stages.1.1.pwconv1.bias, stages.1.1.pwconv2.weight, stages.1.1.pwconv2.bias, stages.1.2.gamma, stages.1.2.dwconv.weight, stages.1.2.dwconv.bias, stages.1.2.norm.weight, stages.1.2.norm.bias, stages.1.2.pwconv1.weight, stages.1.2.pwconv1.bias, stages.1.2.pwconv2.weight, stages.1.2.pwconv2.bias, stages.2.0.gamma, stages.2.0.dwconv.weight, stages.2.0.dwconv.bias, stages.2.0.norm.weight, stages.2.0.norm.bias, stages.2.0.pwconv1.weight, stages.2.0.pwconv1.bias, stages.2.0.pwconv2.weight, stages.2.0.pwconv2.bias, stages.2.1.gamma, stages.2.1.dwconv.weight, stages.2.1.dwconv.bias, stages.2.1.norm.weight, stages.2.1.norm.bias, stages.2.1.pwconv1.weight, stages.2.1.pwconv1.bias, stages.2.1.pwconv2.weight, stages.2.1.pwconv2.bias, stages.2.2.gamma, stages.2.2.dwconv.weight, stages.2.2.dwconv.bias, stages.2.2.norm.weight, stages.2.2.norm.bias, stages.2.2.pwconv1.weight, stages.2.2.pwconv1.bias, stages.2.2.pwconv2.weight, stages.2.2.pwconv2.bias, stages.2.3.gamma, stages.2.3.dwconv.weight, stages.2.3.dwconv.bias, stages.2.3.norm.weight, stages.2.3.norm.bias, stages.2.3.pwconv1.weight, stages.2.3.pwconv1.bias, stages.2.3.pwconv2.weight, stages.2.3.pwconv2.bias, stages.2.4.gamma, stages.2.4.dwconv.weight, stages.2.4.dwconv.bias, stages.2.4.norm.weight, stages.2.4.norm.bias, stages.2.4.pwconv1.weight, stages.2.4.pwconv1.bias, stages.2.4.pwconv2.weight, stages.2.4.pwconv2.bias, stages.2.5.gamma, stages.2.5.dwconv.weight, stages.2.5.dwconv.bias, stages.2.5.norm.weight, stages.2.5.norm.bias, stages.2.5.pwconv1.weight, stages.2.5.pwconv1.bias, stages.2.5.pwconv2.weight, stages.2.5.pwconv2.bias, stages.2.6.gamma, stages.2.6.dwconv.weight, stages.2.6.dwconv.bias, stages.2.6.norm.weight, stages.2.6.norm.bias, stages.2.6.pwconv1.weight, stages.2.6.pwconv1.bias, stages.2.6.pwconv2.weight, stages.2.6.pwconv2.bias, stages.2.7.gamma, stages.2.7.dwconv.weight, stages.2.7.dwconv.bias, stages.2.7.norm.weight, stages.2.7.norm.bias, stages.2.7.pwconv1.weight, stages.2.7.pwconv1.bias, stages.2.7.pwconv2.weight, stages.2.7.pwconv2.bias, stages.2.8.gamma, stages.2.8.dwconv.weight, stages.2.8.dwconv.bias, stages.2.8.norm.weight, stages.2.8.norm.bias, stages.2.8.pwconv1.weight, stages.2.8.pwconv1.bias, stages.2.8.pwconv2.weight, stages.2.8.pwconv2.bias, stages.2.9.gamma, stages.2.9.dwconv.weight, stages.2.9.dwconv.bias, stages.2.9.norm.weight, stages.2.9.norm.bias, stages.2.9.pwconv1.weight, stages.2.9.pwconv1.bias, stages.2.9.pwconv2.weight, stages.2.9.pwconv2.bias, stages.2.10.gamma, stages.2.10.dwconv.weight, stages.2.10.dwconv.bias, stages.2.10.norm.weight, stages.2.10.norm.bias, stages.2.10.pwconv1.weight, stages.2.10.pwconv1.bias, stages.2.10.pwconv2.weight, stages.2.10.pwconv2.bias, stages.2.11.gamma, stages.2.11.dwconv.weight, stages.2.11.dwconv.bias, stages.2.11.norm.weight, stages.2.11.norm.bias, stages.2.11.pwconv1.weight, stages.2.11.pwconv1.bias, stages.2.11.pwconv2.weight, stages.2.11.pwconv2.bias, stages.2.12.gamma, stages.2.12.dwconv.weight, stages.2.12.dwconv.bias, stages.2.12.norm.weight, stages.2.12.norm.bias, stages.2.12.pwconv1.weight, stages.2.12.pwconv1.bias, stages.2.12.pwconv2.weight, stages.2.12.pwconv2.bias, stages.2.13.gamma, stages.2.13.dwconv.weight, stages.2.13.dwconv.bias, stages.2.13.norm.weight, stages.2.13.norm.bias, stages.2.13.pwconv1.weight, stages.2.13.pwconv1.bias, stages.2.13.pwconv2.weight, stages.2.13.pwconv2.bias, stages.2.14.gamma, stages.2.14.dwconv.weight, stages.2.14.dwconv.bias, stages.2.14.norm.weight, stages.2.14.norm.bias, stages.2.14.pwconv1.weight, stages.2.14.pwconv1.bias, stages.2.14.pwconv2.weight, stages.2.14.pwconv2.bias, stages.2.15.gamma, stages.2.15.dwconv.weight, stages.2.15.dwconv.bias, stages.2.15.norm.weight, stages.2.15.norm.bias, stages.2.15.pwconv1.weight, stages.2.15.pwconv1.bias, stages.2.15.pwconv2.weight, stages.2.15.pwconv2.bias, stages.2.16.gamma, stages.2.16.dwconv.weight, stages.2.16.dwconv.bias, stages.2.16.norm.weight, stages.2.16.norm.bias, stages.2.16.pwconv1.weight, stages.2.16.pwconv1.bias, stages.2.16.pwconv2.weight, stages.2.16.pwconv2.bias, stages.2.17.gamma, stages.2.17.dwconv.weight, stages.2.17.dwconv.bias, stages.2.17.norm.weight, stages.2.17.norm.bias, stages.2.17.pwconv1.weight, stages.2.17.pwconv1.bias, stages.2.17.pwconv2.weight, stages.2.17.pwconv2.bias, stages.2.18.gamma, stages.2.18.dwconv.weight, stages.2.18.dwconv.bias, stages.2.18.norm.weight, stages.2.18.norm.bias, stages.2.18.pwconv1.weight, stages.2.18.pwconv1.bias, stages.2.18.pwconv2.weight, stages.2.18.pwconv2.bias, stages.2.19.gamma, stages.2.19.dwconv.weight, stages.2.19.dwconv.bias, stages.2.19.norm.weight, stages.2.19.norm.bias, stages.2.19.pwconv1.weight, stages.2.19.pwconv1.bias, stages.2.19.pwconv2.weight, stages.2.19.pwconv2.bias, stages.2.20.gamma, stages.2.20.dwconv.weight, stages.2.20.dwconv.bias, stages.2.20.norm.weight, stages.2.20.norm.bias, stages.2.20.pwconv1.weight, stages.2.20.pwconv1.bias, stages.2.20.pwconv2.weight, stages.2.20.pwconv2.bias, stages.2.21.gamma, stages.2.21.dwconv.weight, stages.2.21.dwconv.bias, stages.2.21.norm.weight, stages.2.21.norm.bias, stages.2.21.pwconv1.weight, stages.2.21.pwconv1.bias, stages.2.21.pwconv2.weight, stages.2.21.pwconv2.bias, stages.2.22.gamma, stages.2.22.dwconv.weight, stages.2.22.dwconv.bias, stages.2.22.norm.weight, stages.2.22.norm.bias, stages.2.22.pwconv1.weight, stages.2.22.pwconv1.bias, stages.2.22.pwconv2.weight, stages.2.22.pwconv2.bias, stages.2.23.gamma, stages.2.23.dwconv.weight, stages.2.23.dwconv.bias, stages.2.23.norm.weight, stages.2.23.norm.bias, stages.2.23.pwconv1.weight, stages.2.23.pwconv1.bias, stages.2.23.pwconv2.weight, stages.2.23.pwconv2.bias, stages.2.24.gamma, stages.2.24.dwconv.weight, stages.2.24.dwconv.bias, stages.2.24.norm.weight, stages.2.24.norm.bias, stages.2.24.pwconv1.weight, stages.2.24.pwconv1.bias, stages.2.24.pwconv2.weight, stages.2.24.pwconv2.bias, stages.2.25.gamma, stages.2.25.dwconv.weight, stages.2.25.dwconv.bias, stages.2.25.norm.weight, stages.2.25.norm.bias, stages.2.25.pwconv1.weight, stages.2.25.pwconv1.bias, stages.2.25.pwconv2.weight, stages.2.25.pwconv2.bias, stages.2.26.gamma, stages.2.26.dwconv.weight, stages.2.26.dwconv.bias, stages.2.26.norm.weight, stages.2.26.norm.bias, stages.2.26.pwconv1.weight, stages.2.26.pwconv1.bias, stages.2.26.pwconv2.weight, stages.2.26.pwconv2.bias, stages.3.0.gamma, stages.3.0.dwconv.weight, stages.3.0.dwconv.bias, stages.3.0.norm.weight, stages.3.0.norm.bias, stages.3.0.pwconv1.weight, stages.3.0.pwconv1.bias, stages.3.0.pwconv2.weight, stages.3.0.pwconv2.bias, stages.3.1.gamma, stages.3.1.dwconv.weight, stages.3.1.dwconv.bias, stages.3.1.norm.weight, stages.3.1.norm.bias, stages.3.1.pwconv1.weight, stages.3.1.pwconv1.bias, stages.3.1.pwconv2.weight, stages.3.1.pwconv2.bias, stages.3.2.gamma, stages.3.2.dwconv.weight, stages.3.2.dwconv.bias, stages.3.2.norm.weight, stages.3.2.norm.bias, stages.3.2.pwconv1.weight, stages.3.2.pwconv1.bias, stages.3.2.pwconv2.weight, stages.3.2.pwconv2.bias, norm0.weight, norm0.bias, norm1.weight, norm1.bias, norm2.weight, norm2.bias, norm3.weight, norm3.bias

    Thank you !! Anshu

    opened by anshudaur 0
  • Why LayerNorm before conv in downsampling layers ?

    Why LayerNorm before conv in downsampling layers ?

    Thanks for your awesome work!

    While stem is coherent in regard to Blocks where we have the ordering conv->norm, in dowsampling layers you put LayerNorm before convolution.

    The full path is:

    • conv2d 4x4, stride 4
    • layernorm
    • residual stage 1
    • layernorm
    • conv2d 2x2, stride 2
    • residual stage 2
    • layernorm
    • conv2d 2x2, stride 2
    • residual stage 3
    • layernorm
    • conv2d 2x2, stride 2
    • residual stage 4

    Which means that if residual stage 1 converges to identity, we have a layernorm into a layernorm which seems weird to me:

    • conv2d 4x4, stride 4
    • layernorm
    • layernorm
    • conv2d 2x2, stride 2

    Can you explain this design choice ?

    opened by F-Barto 0
  • Infinite loss value when training under amp

    Infinite loss value when training under amp

    Hi, I encounter the infinite loss value assertion failure when training using mixed precision. The trackback like this:

    Traceback (most recent call last):
      File "main.py", line 498, in <module>
        main(args)
      File "main.py", line 409, in main
        train_stats = train_one_epoch(
      File "ConvNeXt/engine.py", line 63, in train_one_epoch
        assert math.isfinite(loss_value)
    AssertionError
    

    I wonder how I could fix this problem. Thanks very much!

    opened by jameslahm 0
Owner
Meta Research
Meta Research
Code release for NeX: Real-time View Synthesis with Neural Basis Expansion

NeX: Real-time View Synthesis with Neural Basis Expansion Project Page | Video | Paper | COLAB | Shiny Dataset We present NeX, a new approach to novel

null 536 Dec 20, 2022
The code release of paper 'Domain Generalization for Medical Imaging Classification with Linear-Dependency Regularization' NIPS 2020.

Domain Generalization for Medical Imaging Classification with Linear Dependency Regularization The code release of paper 'Domain Generalization for Me

Yufei Wang 56 Dec 28, 2022
Code release for "Transferable Semantic Augmentation for Domain Adaptation" (CVPR 2021)

Transferable Semantic Augmentation for Domain Adaptation Code release for "Transferable Semantic Augmentation for Domain Adaptation" (CVPR 2021) Paper

null 66 Dec 16, 2022
This is the official code release for the paper Shape and Material Capture at Home

This is the official code release for the paper Shape and Material Capture at Home. The code enables you to reconstruct a 3D mesh and Cook-Torrance BRDF from one or more images captured with a flashlight or camera with flash.

null 89 Dec 10, 2022
Code release for "COTR: Correspondence Transformer for Matching Across Images"

COTR: Correspondence Transformer for Matching Across Images This repository contains the inference code for COTR. We plan to release the training code

UBC Computer Vision Group 360 Jan 6, 2023
Code release for paper: The Boombox: Visual Reconstruction from Acoustic Vibrations

The Boombox: Visual Reconstruction from Acoustic Vibrations Boyuan Chen, Mia Chiquier, Hod Lipson, Carl Vondrick Columbia University Project Website |

Boyuan Chen 12 Nov 30, 2022
We will release the code of "ConTNet: Why not use convolution and transformer at the same time?" in this repo

ConTNet Introduction ConTNet (Convlution-Tranformer Network) is proposed mainly in response to the following two issues: (1) ConvNets lack a large rec

null 93 Nov 8, 2022
Code release to accompany paper "Geometry-Aware Gradient Algorithms for Neural Architecture Search."

Geometry-Aware Gradient Algorithms for Neural Architecture Search This repository contains the code required to run the experiments for the DARTS sear

null 18 May 27, 2022
This is the dataset and code release of the OpenRooms Dataset.

This is the dataset and code release of the OpenRooms Dataset.

Visual Intelligence Lab of UCSD 95 Jan 8, 2023
Code release of paper "Deep Multi-View Stereo gone wild"

Deep MVS gone wild Pytorch implementation of "Deep MVS gone wild" (Paper | website) This repository provides the code to reproduce the experiments of

François Darmon 53 Dec 24, 2022
Code release for DS-NeRF (Depth-supervised Neural Radiance Fields)

Depth-supervised NeRF: Fewer Views and Faster Training for Free Project | Paper | YouTube Pytorch implementation of our method for learning neural rad

null 524 Jan 8, 2023
Code release for BlockGAN: Learning 3D Object-aware Scene Representations from Unlabelled Images

BlockGAN Code release for BlockGAN: Learning 3D Object-aware Scene Representations from Unlabelled Images BlockGAN: Learning 3D Object-aware Scene Rep

null 41 May 18, 2022
Code Release for Learning to Adapt to Evolving Domains

EAML Code release for "Learning to Adapt to Evolving Domains" (NeurIPS 2020) Prerequisites PyTorch >= 0.4.0 (with suitable CUDA and CuDNN version) tor

null 23 Dec 7, 2022
Code release for "Self-Tuning for Data-Efficient Deep Learning" (ICML 2021)

Self-Tuning for Data-Efficient Deep Learning This repository contains the implementation code for paper: Self-Tuning for Data-Efficient Deep Learning

THUML @ Tsinghua University 101 Dec 11, 2022
Code release for our paper, "SimNet: Enabling Robust Unknown Object Manipulation from Pure Synthetic Data via Stereo"

SimNet: Enabling Robust Unknown Object Manipulation from Pure Synthetic Data via Stereo Thomas Kollar, Michael Laskey, Kevin Stone, Brijen Thananjeyan

null 68 Dec 14, 2022
Code release for The Devil is in the Channels: Mutual-Channel Loss for Fine-Grained Image Classification (TIP 2020)

The Devil is in the Channels: Mutual-Channel Loss for Fine-Grained Image Classification Code release for The Devil is in the Channels: Mutual-Channel

PRIS-CV: Computer Vision Group 230 Dec 31, 2022
Code release for NeurIPS 2020 paper "Co-Tuning for Transfer Learning"

CoTuning Official implementation for NeurIPS 2020 paper Co-Tuning for Transfer Learning. [News] 2021/01/13 The COCO 70 dataset used in the paper is av

THUML @ Tsinghua University 35 Sep 23, 2022
Code release for NeuS

NeuS We present a novel neural surface reconstruction method, called NeuS, for reconstructing objects and scenes with high fidelity from 2D image inpu

Peng Wang 813 Jan 4, 2023
Code Release for ICCV 2021 (oral), "AdaFit: Rethinking Learning-based Normal Estimation on Point Clouds"

AdaFit: Rethinking Learning-based Normal Estimation on Point Clouds (ICCV 2021 oral) **Project Page | Arxiv ** Runsong Zhu¹, Yuan Liu², Zhen Dong¹, Te

null 40 Dec 30, 2022