I got Issue while predicting the images? #379
Unanswered
emadyounan
asked this question in
Q&A
Replies: 1 comment
-
Hi @emadyounan, Looks like you're trying to use black and white images (1 colour channel) with a model that accepts colour images (3 colour channels). I'd look into your model definition to adjust it to work with black and white images. See your own image data shape is: But the model expects: You can try changing this behaviour here: # Create and initialize of TinyVGG
model_0 = TingVGG(input_shape=3, # Number of channels in the input image (c, h, w) -> 3
hidden_units=10,
output_shape=len(train_data.classes)).to(device) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using my own black and white tiff images dataset and I created the model_0 as the videos I will put my code That's that the error I got
"Given groups=1, weight of size [10, 3, 3, 3], expected input[1, 1, 128, 128] to have 3 channels, but got 1 channels instead"
here is the full code:
Beta Was this translation helpful? Give feedback.
All reactions