Skip to content

Undefined method zero_grad_all in Tensor.grad_check #30

Description

@github-actions

File: leanpass/tensor.py

The grad_check utility calls self.zero_grad_all(), but the Tensor class only defines zero_grad. This results in an AttributeError when the gradient checker is used, breaking a common debugging workflow.

Fix: replace the call with self.zero_grad() (or implement zero_grad_all to recursively zero gradients of all leaf tensors).

Filed automatically by ai-issue-scan.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions