Feed & Concat Tensors of Multi-resolution Image at a Conv-layer

Hi

I want to train a 2-conv/3-conv layered model by feeding and transforming every single input image into multiple resolution, e.g., 128,96 and 64,48. At a specific conv-layer (e.g, 3rd conv), I then need the tensor outputs of both the resolution. What can be the easiest way to do it on pytroch?

Thank You.

You could implement the rescaling and the usage of different code paths in the forward method of your model.
To rescale the tensor activations you could use e.g. torch.nn.functional.interpolate or an upsamling layer.

Thank You, done that - during training: for 4D tensor (Batch, Channel, Width, Height), I used python indexing in loop, e.g., Imagesbatch[:,:,::ImgScale,::ImgScale] for image down sampling followed with forward pass and tensor concatenation. :slight_smile: