Skip to content

Tensor.grad_check calls undefined zero_grad_all method #26

Description

@github-actions

File: leanpass/tensor.py

During gradient checking the code invokes self.zero_grad_all(), but Tensor only defines zero_grad. This results in an AttributeError and makes grad_check unusable. Replace the call with the existing method or implement zero_grad_all that zeros gradients of all leaf tensors.

# replace
- self.zero_grad_all()
+ self.zero_grad()

Filed automatically by ai-issue-scan.

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