Could you explain how the separate input tensor look like and how a “part of the given input tensor” would be used to smooth the image?
Generally you can use the functional API via F.conv2d to apply a kernel on an image tensor, but I’m unsure about the aforementioned aspects.