Skip to content

Update autogradyt_tutorial.py for 2.0 #2219

Closed
@svekars

Description

@svekars

The default value of the set_to_none parameter has changed from False to True which caused the autogradyt_tutorial.py fail on 2.0 build:

  File "/Users/svekars/repositories/tutorials2/tutorials/beginner_source/introyt/autogradyt_tutorial.py", line 339, in <module>
    print(model.layer2.weight.grad[0][0:10])
TypeError: 'NoneType' object is not subscriptable

Explicitly setting this value to False in the tutorial fixes the issue.

cc @suraj813

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions