Open hwopark opened 8 months ago
@hwopark Sorry for the delay in replying. The code contains a bug as you have pointed out. Please use the following function
def to_device(inputs: dict, decice: str = 'cuda') -> dict:.
for k, v in inputs.items():
if isinstance(v, torch.Tensor):.
inputs[k] = v.to(device)
return inputs
When I run the code for ASV examples, I got error ('dict' object has no attribute 'to) because of inputs is dict of tensors.
Are there any alternatives?
https://github.com/sinhat98/adapter-wavlm/blob/4226ea86793e2487ff6b3b5941c9a4284eb16194/ASV/utils.py#L237