I have implemented a function which takes a tensor of size (batch_size x width x height) as input, and returns a tensor of size (batch_size x 1 x 1).
What I would like to do is apply this “convolutionally” to a tensor - in other words, sliding a window across the input tensor, and applying the function to each of these windows in turn, producing an output which (with padding) is the same size as the input tensor.
What would be the best/simplest way to do this?