Skip to content

fix a bug when calling modules#1533

Closed
mdering wants to merge 2 commits intopytorch:masterfrom
mdering:forwardfix
Closed

fix a bug when calling modules#1533
mdering wants to merge 2 commits intopytorch:masterfrom
mdering:forwardfix

Conversation

@mdering
Copy link
Contributor

@mdering mdering commented May 10, 2017

a module that returns a non-standard data structure currently breaks
due to checks for backwards hooks. This refactors the code slightly so
this will only break in the event of backwards hooks.

a module that returns a non-standard data structure currently breaks
due to checks for backwards hooks. This refactors the code slightly so
this will only break in the event of backwards hooks.
while not isinstance(var, Variable):
var = var[0]
grad_fn = var.grad_fn
if grad_fn is not None and

This comment was marked as off-topic.

bar
@mdering
Copy link
Contributor Author

mdering commented May 10, 2017

oh god. hang on

@mdering mdering closed this May 10, 2017
@mdering mdering deleted the forwardfix branch May 10, 2017 23:22
zasdfgbnm pushed a commit to zasdfgbnm/pytorch that referenced this pull request Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants