Perhaps a better way of explaining what I’m trying to do is that I’m trying to find a better way of implementing the following pseudocode:
def convolutional_function(input):
    for x in range(width):
        for y in range(height):
            index window of input
            intermediate_output = myfunction(indexed_input)
            concatenate intermediate inputs