Skip to content

[02_pytorch_classification.ipynb] | RuntimeError: mat1 and mat2 shapes cannot be multiplied (200x5 and 2x5) #232

Answered by mrdbourke
prince-kha asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @prince-kha,

@AlienSarlak is correct, the tensors you're trying to put into the network are incorrect shapes.

I'd check the shapes of all of your inputs and make sure they line up with the matrix multiplication rule: https://www.learnpytorch.io/00_pytorch_fundamentals/#matrix-multiplication-is-all-you-need

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mrdbourke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants