Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass #1

Open
XiangFeng66 opened this issue Oct 17, 2022 · 1 comment

Comments

@XiangFeng66
Copy link

when I run this code ,I have this question
Traceback (most recent call last):
File "D:\软件\pycharm专业版\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevd.py", line 1491, in exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\软件\pycharm专业版\PyCharm 2022.1.3\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/科研/Soblev_INrs/Sobolev_INRs-main/Experiments/inverse_rendering/train.py", line 696, in
train()
File "D:/科研/Soblev_INrs/Sobolev_INRs-main/Experiments/inverse_rendering/train.py", line 613, in train
der_loss = der_mse(rgb, coordinate_s, target_grad_s)
File "D:\科研\Soblev_INrs\Sobolev_INRs-main\Experiments\inverse_rendering\loss.py", line 15, in der_mse
pred_grad_r = diff_operators.gradient(
File "D:\科研\Soblev_INrs\Sobolev_INRs-main\Experiments\inverse_rendering\diff_operators.py", line 7, in gradient
grad = torch.autograd.grad(y, [x], grad_outputs=grad_outputs, create_graph=True)[0]
File "D:\Anaconda\envs\fengxiangNerf\lib\site-packages\torch\autograd_init
.py", line 276, in grad
return Variable.execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: CUDA out of memory. Tried to allocate 64.00 MiB (GPU 0; 6.00 GiB total capacity; 5.17 GiB already allocated; 0 bytes free; 5.31 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split

I don't know the reason why this code have question

@wtyuan96
Copy link
Collaborator

Sorry for the late reply.
The reason for this RuntimeError is that your GPU memory is not large enough, you can try to run this code on GPU with larger memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants