Skip to content

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

@suws0501

Description

@suws0501

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions