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

illegal memory access #11

Closed
shashankvkt opened this issue Oct 21, 2018 · 4 comments
Closed

illegal memory access #11

shashankvkt opened this issue Oct 21, 2018 · 4 comments

Comments

@shashankvkt
Copy link

shashankvkt commented Oct 21, 2018

Hello,
Thank you very much for roviding the C3D version of pytorch. I am trying to extract features for another dataset, which contains around 1748 frames in one video. While doing so I am facing an issue as following:-
RuntimeError: CUDA error: an illegal memory access was encountered

My input size is after passing through the function get_sport_clip() is torch.Size([1, 3, 1748, 112, 112])
I was wondering if you could kindly assist me in solving this issue.
Thank you very much once again.

@DavideA
Copy link
Owner

DavideA commented Oct 22, 2018

Hi and thanks for interest.

You can't do that.
That's because this architecture is tailored to take as input 16-frames clips.

Theoretically (i.e. with infinite gpu memory) you could compute features for such input shapes up to pool5. After that, the reshape at line 59 of C3D_model.py would result in a different dimension w.r.t. the subsequent linear layer, causing an error.

A common practice in those cases is to compute descriptors for 16-frames clips. In your case that would result in 1748-16 descriptors. But it depends on your application.

Hope this helps,
D

@shashankvkt
Copy link
Author

Thank you for your feedback.
Just to summarize, what you are trying to say is that the model is trained to input 16 sequential frames and computes its corresponding features for these 16 frames. This would be computed for
total frames / 16 times?
Hope this is correct?
Thank you

@DavideA
Copy link
Owner

DavideA commented Oct 25, 2018

Just to summarize, what you are trying to say is that the model is trained to input 16 sequential frames and computes its corresponding features for these 16 frames.

Precisely.

This would be computed for total frames / 16 times?

It depends on what you feed to the model. If you build 16 frames clip striding one frame at a time (x_0 to x_15, x_1 to x_16 and so on) it would result in total_frames - 16 descriptors. But again, it depends on you and what you want to do with such descriptors.

D

@shashankvkt
Copy link
Author

Cool...Thank you very much!

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