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

code question #19

Open
007invictus opened this issue Apr 12, 2022 · 3 comments
Open

code question #19

007invictus opened this issue Apr 12, 2022 · 3 comments

Comments

@007invictus
Copy link

in 45and47 line of the document "dataset.py"
did you want to write self.data_root instead pickle_root?

@007invictus
Copy link
Author

and i met an error:
Traceback (most recent call last):
File "main.py", line 197, in
main(args)
File "main.py", line 150, in main
args.clip_max_norm)
File "/data/wtyuan/git/OadTR/train.py", line 65, in train_one_epoch
model(camera_inputs, motion_inputs)
File "/data/wtyuan/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/data/wtyuan/git/OadTR/transformer_models/ViT.py", line 160, in forward
x = self.linear_encoding(x)
File "/data/wtyuan/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/data/wtyuan/anaconda3/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 103, in forward
return F.linear(input, self.weight, self.bias)
File "/data/wtyuan/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py", line 1848, in linear
return torch._C._nn.linear(input, weight, bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (8192x4096 and 3072x1024)

could you please give some advices?

@wangxiang1230
Copy link
Owner

and i met an error: Traceback (most recent call last): File "main.py", line 197, in main(args) File "main.py", line 150, in main args.clip_max_norm) File "/data/wtyuan/git/OadTR/train.py", line 65, in train_one_epoch model(camera_inputs, motion_inputs) File "/data/wtyuan/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/data/wtyuan/git/OadTR/transformer_models/ViT.py", line 160, in forward x = self.linear_encoding(x) File "/data/wtyuan/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/data/wtyuan/anaconda3/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 103, in forward return F.linear(input, self.weight, self.bias) File "/data/wtyuan/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py", line 1848, in linear return torch._C._nn.linear(input, weight, bias) RuntimeError: mat1 and mat2 shapes cannot be multiplied (8192x4096 and 3072x1024)

could you please give some advices?

It looks like you are using the Thumos14-Kinetics feature, which is 4096-dim (rgb: 2048, flow: 2048). You need to change the network input dimension by "python main.py --dim_feature 4096“.

@wangxiang1230
Copy link
Owner

in 45and47 line of the document "dataset.py" did you want to write self.data_root instead pickle_root?

The purpose of these lines is to read the packed features, all packaged in a pickle file.

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

2 participants