Function base class uses _grad_fn but Tensor doesn't have it yet in Module 06 Autograd #525

Closed
opened 2026-03-22 15:45:12 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @uday2005 on GitHub (Mar 15, 2026).

While going through Module 06, I noticed that the Function base class checks for _grad_fn on tensors inside init, but the Tensor class at this point in the curriculum has no _grad_fn attribute at all and I checked the next two module
as well and there is no mention anywhere of making changes to the Tensor class to add this attribute.

Originally created by @uday2005 on GitHub (Mar 15, 2026). While going through Module 06, I noticed that the Function base class checks for _grad_fn on tensors inside __init__, but the Tensor class at this point in the curriculum has no _grad_fn attribute at all and I checked the next two module as well and there is no mention anywhere of making changes to the Tensor class to add this attribute.
GiteaMirror added the type: bugarea: book labels 2026-03-22 15:45:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#525