fc4-pytorch
fc4-pytorch copied to clipboard
[img2npy.py] Expected all tensors to be on the same device, but found at least two devices.
Hello thank you for ur support of reproducing FC4 on pytorch.
there is some errors I encountered when running img2npy.py
in VSCode
My PC configuration includes CPU and GPU.
I used torch==2.4.1
supporting GPU
in utils.py
line 52
correction = illuminant.unsqueeze(2).unsqueeze(3) * torch.sqrt(Tensor([3])).to(DEVICE)
showing the error in the title.
I changed this line to
correction = illuminant.unsqueeze(2).unsqueeze(3).to(DEVICE) * torch.sqrt(Tensor([3])).to(DEVICE)
no idea if you upload the version with only cpu.
Best Regards, Carry