Skip to content

'MSELoss' object has no attribute 'next_functions' #97

Closed
@theodoruszq

Description

@theodoruszq

I am reading tutorial of learning pytorch, but I get stuck in one error as follow.

https://github.com/pytorch/tutorials/blob/master/beginner_source/blitz/neural_networks_tutorial.py

Lines from 184 to 186 are my source code. And I have replace grad_fn to creator as grad_fn throws error out.

Paste my error info below.

Traceback (most recent call last):
  File "./network.py", line 56, in <module>
    print(loss.creator.next_functions[0][0])
AttributeError: 'MSELoss' object has no attribute 'next_functions'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions