I retrained a model based on deespeech2 to transcribe audio to test by following this blog post 2.  Then I followed the  PyTorch mobile documentation 1 because I would like to use the model on a mobile android/ios device.
To be able to run the model I need to load and transform the wav audio 16000 Hz into a Mel spectrogram. I am doing this by using the transforms.MelSpectrogram function.  However right now I have this function inside the Dataset module.
Is it correct to add this transformation inside the Model module before forward?
By adding this transformation inside the model will create problems when I call torch.jit.script and torch.jit.save functions?