Skip to content

CNN dimension error #8238

Jul 1, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

To me it seems like you have forgotten the batch dimension. 2D convolutions expect input to have shape [N, C, H, W] where C=193, H=229 and W=193 (is it correct that you have the same amount of channels as the width?). If you only want to feed in a single image you can do sample.unsqueeze(0) to add the extra batch dimension in front.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ik362
Comment options

Answer selected by awaelchli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants