Device error when using Deltas

I wanted to test a model using MFCC + Deltas but, when I set the parameter “deltas” to True, I got the following error

Traceback (most recent call last):
  File "", line 342, in <module>
  File "/home/acp13gr/speechbrain/speechbrain/", line 1033, in fit
    loss = self.fit_batch(batch)
  File "", line 97, in fit_batch
    outputs = self.compute_forward(batch, sb.Stage.TRAIN)
  File "", line 51, in compute_forward
    feats = self.hparams.compute_features(wavs)
  File "/home/acp13gr/.conda/envs/speechbrain/lib/python3.8/site-packages/torch/nn/modules/", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/acp13gr/speechbrain/speechbrain/lobes/", line 279, in forward
    delta1 = self.compute_deltas(mfccs)
  File "/home/acp13gr/.conda/envs/speechbrain/lib/python3.8/site-packages/torch/nn/modules/", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/acp13gr/speechbrain/speechbrain/processing/", line 839, in forward
    torch.nn.functional.conv1d(x, self.kernel, groups=x.shape[1])
RuntimeError: Expected object of device type cuda but got device type cpu for argument #2 'weight' in call to _thnn_conv_depthwise2d_forward

in yalm:

compute_features: !new:speechbrain.lobes.features.MFCC
    deltas: True
    context: True
    win_length: 25
    hop_length: 10
    n_mfcc: !ref <n_mels>
    f_min: 20
    f_max: 7600
    sample_rate: !ref <sample_rate>
    n_fft: !ref <n_fft>
    n_mels: !ref <n_mels>

btw, I got the same error if I add deltas to Fbank.

Thank you

Interesting, could you try to put the compute_features in the modules ? So it is sent to the device as well ?