Skip to content
Discussion options

You must be logged in to vote

The default collate function will combine elements of the same key. In this way, you'll have a single dictionary, and each value in that dictionary will be a batch. So batch["image"] will be a torch.Tensor, but will now have the shape B,C,H,W,[D]. The added B is the size of the batch, so in your example will be 2.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by wyli
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