Skip to content

New model runtime error #17

@Astronaut323

Description

@Astronaut323

Hi, I had no problems loading and running the previous model, but the new version of the model is running with the following errors.

Traceback (most recent call last):
File "/home/songxiaonan/ReDimNet-master/test_1N.py", line 181, in
acc, suspected_daibin_records = compare_folders(model, folder1, folder2, output_csv_1N, labeld_csv, device,
File "/home/songxiaonan/ReDimNet-master/test_1N.py", line 56, in compare_folders
features2[file_path] = extract_features(model, preprocess_audio(file_path, device)).flatten()
File "/home/songxiaonan/ReDimNet-master/test_gpu.py", line 87, in extract_features
features = model(audio_tensor.unsqueeze(0))
File "/home/model/public/songxiaonan/anaconda3/envs/redimnet/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/songxiaonan/ReDimNet-master/redimnet/model.py", line 422, in forward
x = self.spec(x)
File "/home/model/public/songxiaonan/anaconda3/envs/redimnet/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/songxiaonan/ReDimNet-master/redimnet/layers/features.py", line 139, in forward
x = self.torchfbank(x)+1e-6
File "/home/model/public/songxiaonan/anaconda3/envs/redimnet/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/model/public/songxiaonan/anaconda3/envs/redimnet/lib/python3.9/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
File "/home/model/public/songxiaonan/anaconda3/envs/redimnet/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/songxiaonan/ReDimNet-master/redimnet/layers/features.py", line 52, in forward
return F.conv1d(x, self.flipped_filter).squeeze(1)
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same

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