Solved by Mwni in post #2 
              
              
                [batch, 1, length_of_spectra] is the correct shape for 1D convolution. Normalization and regularization is the proper way too. 
Regarding your loss becoming NaN after a while, try applying this function to your model before you update weights 
def sanitize_grads(module):
	for param in module.paramet…