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

TypeError: expected np.ndarray (got numpy.ndarray) #103

Open
suws0501 opened this issue Oct 22, 2024 · 1 comment
Open

TypeError: expected np.ndarray (got numpy.ndarray) #103

suws0501 opened this issue Oct 22, 2024 · 1 comment

Comments

@suws0501
Copy link

I download the dataset and the model according to the tutorial but an error like "TypeError: expected np.ndarray (got numpy.ndarray)" plagued me the whole afternoon. I tried searching on google and got answers like "downgrade version numpy < 1.26.4, downgrade torchvision" but nothing worked. However, in the frustration, I wandered around the internet and found a post about Python code stop working after a few years due to back-compatability issues, so I got back and downgrade my Python version to 3.6 and IT WORKED.
So basically I got the code to run while writing this post, but I still fell a compulsion to warn newcomers on the issue: always downgrading your Python version to 3.6 !! Pytorch is confusing enough without this version problems and now urrghh

@azhanisyhptr
Copy link

thank you for the advice. i'll stick to it !

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