Coder Social home page Coder Social logo

Comments (3)

r-kellerm avatar r-kellerm commented on July 17, 2024 1

Hi, please see this issue #21, you need to install our project instead of mmaction2 repo.

Thanks for your response!
uninstalled mmaction2 and reinstalled with pip install -v -e . , but still getting the error from mmcv:
2021-09-30 13:20:02,304 - mmaction - INFO - load model from: pretrained/swin_small_patch244_window877_kinetics400_1k.pth
Traceback (most recent call last):

File "/.local/lib/python3.8/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg
return obj_cls(**args)
File "exp/Video-Swin-Transformer/mmaction/models/recognizers/base.py", line 109, in init
self.init_weights()
File "exp/Video-Swin-Transformer/mmaction/models/recognizers/base.py", line 126, in init_weights
self.backbone.init_weights()
File "exp/Video-Swin-Transformer/mmaction/models/backbones/swin_transformer.py", line 641, in init_weights
self.inflate_weights(logger)
File "exp/Video-Swin-Transformer/mmaction/models/backbones/swin_transformer.py", line 588, in inflate_weights
state_dict['patch_embed.proj.weight'] = state_dict['patch_embed.proj.weight'].unsqueeze(2).repeat(1,1,self.patch_size[0],1,1) / self.patch_size[0]
KeyError: 'patch_embed.proj.weight'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tools/train.py", line 201, in
main()
File "tools/train.py", line 156, in main
model = build_model(
File "exp/Video-Swin-Transformer/mmaction/models/builder.py", line 70, in build_model
return build_localizer(cfg)
File "exp/Video-Swin-Transformer/mmaction/models/builder.py", line 62, in build_localizer
return LOCALIZERS.build(cfg)
File "/.local/lib/python3.8/site-packages/mmcv/utils/registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "/.local/lib/python3.8/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/.local/lib/python3.8/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
KeyError: "Recognizer3D: 'patch_embed.proj.weight'"

Installed mmcv through: pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html.

from video-swin-transformer.

Dzw1219 avatar Dzw1219 commented on July 17, 2024 1

Modified the config file.
Add 'pretrained2d=False'
model=dict(backbone=dict(patch_size=(2,4,4), drop_path_rate=0.1, pretrained2d=False), test_cfg=dict(max_testing_views=4))

from video-swin-transformer.

hust-nj avatar hust-nj commented on July 17, 2024

Hi, please see this issue #21, you need to install our project instead of mmaction2 repo.

from video-swin-transformer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.