Concat Tensor of Multi-resolution Image

Hi,

I’m trying to train a CNN using multi-resolution images with mini-batch training. I plan to maintain its aspect ratio so resizing is not a preferable option.

Currently, I understand that to concatenate tensors of differing image resolution is impossible unless the tensors’ image resolutions are made equal, which is not what I’m trying to do. Unfortunately, this is the default collation in DataLoader.

A workaround I’ve tried is to feed the mini-batch tensors (images) in a list (with custom DataLoader collate function), iterating through each element and aggregating the loss of each tensor. But this seems to result in much slower training.

Any ideas on how to make multi-resolution training works? Thank you in advance