Due to the nature of the layers in my network, I have to do three transpositions:
Input to 1D convolution
1D Convolution to 2D Convolution Transpose
1D Convolution to Dense
This takes an enormous amount of time
batch_time=121.467 seconds
for a batch_size of 10.
A previous model, similar in size, without the transpositions, and on the same dataset took like 10 seconds for the first batch and 0.4 seconds per batch after that. After the first batch, my model above still takes over 4 seconds per batch.
I think I managed to narrow it down to the transpositions I do. Is there a way around this?