yenchenlin / nerf-pytorch

A PyTorch implementation of NeRF (Neural Radiance Fields) that reproduces the results.
MIT License
5.47k stars 1.06k forks source link

Revision for changing GPU #51

Closed D-Hank closed 2 years ago

D-Hank commented 2 years ago

Hi! When I try to run your code on my second GPU, I meet this problem: RuntimeError: Expected all tensors to be on the same device, but found at least two devices: cuda:1 and cuda:0! I've mentioned it in issue #50 and I managed to fix it by the revision below: 图片 And the task will run on the assigned GPU (can be viewed by command nvidia-smi). Please let me know if the revision looks good for you.