You can use python debugger
from IPython.core.debugger import set_trace
Then you write set_trace()
in the forward
of the model (or any other place you need to debug) and you can go line by line and print the sizes.
But if you are using a 1d convolution kernel over your inputs you are computing linear combinations of nearby features. Unless your features have some particular order that is important (like in a time-series) I don’t see how that can help. The regular linear layer combines all the features together.