Skip to content
Discussion options

You must be logged in to vote

the numbers inside torch.Size just describe the shape of the tensor.

torch.Size([1, 3, 3]) → a batch of 1 matrix with shape 3 * 3.

torch.Size([1, 1, 3, 3]) → a batch of 1 image, with 1 channel (grayscale), and spatial size 3 * 3.

torch.Size([1, 1, 4, 4]) → same idea, but the image is 4 * 4 instead of 3 * 3.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Manmath0108
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