Comments (3)
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.
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.
Hi, please see this issue #21, you need to install our project instead of mmaction2 repo.
from video-swin-transformer.
Related Issues (20)
- How to train/test on custom dataset like HMDB51 HOT 6
- How to train MyDataset HOT 1
- About the input image shape HOT 2
- Is there any plan to release the video swin transformer code and pre-trained models of swin transformer V2?
- Embeddings
- Error: av_read_frame failed with 1094995529
- Swin-L pretrain
- Can't export ONNX transformer HOT 3
- is there a priority between drop out and patch norm?
- Error found in the code about shift_size calculation
- How much video memory does a single GPU need to run SSV2? I use the 16G ,then it prompt CUDA out of memory
- Pretraining for SSv2
- Code for duplicate the weights pretrained on Imagenet
- Welcome update to OpenMMLab 2.0
- Pretrained Swin-L on Kinects 600 dataset
- How to resolve this error when training with swin_base_patch244_window877_kinetics400_1k.py
- Missing keys in source state_dict: backbone.patch_embed.proj.weight, backbone.patch_embed.proj.bias, and so on.
- size mismatch for cls_head.fc_cls.weight: copying a param with shape torch.Size([400, 1024]) from checkpoint, the shape in current model is torch.Size([101, 1024]).
- How to solve this: AttributeError: 'Recognizer2D' object has no attribute 'demo/label_map_k400'
- TypeError: 'str' object is not callable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from video-swin-transformer.