Skip to content

Device error when setting deltas=True in speechbrain.lobes.features.Fbank. #1489

@sangeet2020

Description

@sangeet2020

While extracting features of a wave tensor, I tried to use delta coefficients along with 40 filter-bank coefficients by setting deltas=True in speechbrain.lobes.features.Fbank. However, this runs into

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument weight in method wrapper___conv_depthwise2d)

The error lies in the this line.
Changing it to (just for debug shake)

torch.nn.functional.conv1d(x.to(device='cpu'), self.kernel, groups=x.shape[1])

fixes the error.
i.e. the input and kernel tensor must be put into the same device.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions