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

Tiling layer causing incorrect graph creation in Pytorch #7

Open
sandeepnmenon opened this issue Mar 17, 2021 · 0 comments
Open

Tiling layer causing incorrect graph creation in Pytorch #7

sandeepnmenon opened this issue Mar 17, 2021 · 0 comments

Comments

@sandeepnmenon
Copy link

While trying to train the vpgnet model with the Tiling layer, I am getting the following error

    loss.backward()
  File "/home/SandeepMenon/venv-e3d/lib/python3.6/site-packages/torch/tensor.py", line 221, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/SandeepMenon/venv-e3d/lib/python3.6/site-packages/torch/autograd/__init__.py", line 132, in backward
    allow_unreachable=True)  # allow_unreachable flag
RuntimeError: Trying to backward through the graph a second time, but the saved intermediate results have already been freed. Specify retain_graph=True when calling backward the first time.

I suspect this to be the Tiling layer issue, because when I remove the tiling layer (and resize the ground truth accordingly), the model trains without errors.

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

1 participant