Florian_1990:

return TensorDict({‘mfcc’: self.normalized_mfcc[item,:].clone(), ‘phoneme’: phonemes_one_hot})


can you change this portion of the code to the following and try once?
current_mfcc = self.normalized_mfcc[item,:].detach()
current_mfcc.requires_grad=True
return TensorDict({'mfcc': current_mfcc, 'phoneme': phonemes_one_hot})