After calling DataProcessor.to(device), submodule parameters and buffers (i.e. CQT kernels) should remain on device.
Actual behaviour
If DataProcessor.sampling_rate is changed, a new CQT submodule is constructed on self.device, which is set on construction and not updated on calls to .to(device), .cpu(), or .cuda().
Expected behavior
After calling
DataProcessor.to(device)
, submodule parameters and buffers (i.e. CQT kernels) should remain ondevice
.Actual behaviour
If
DataProcessor.sampling_rate
is changed, a newCQT
submodule is constructed onself.device
, which is set on construction and not updated on calls to.to(device)
,.cpu()
, or.cuda()
.Minimal example
Outputs:
We would expect the last two lines to be
cuda:0
.