Skip to content

Assignment 9 - data training: error when trying to evaluate a model #13

Answered by BardiaKh
andreicorni25 asked this question in Q & A
Discussion options

You must be logged in to vote

This is caused by the input having a different data type as model weights. I would suggest adding this line just before building your model:

img = img.float()

This will convert your image tensor into float data type, which is the same as your model weight data type.

Replies: 1 comment

Comment options

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