Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show requires_grad info for torch tensors and parameters. #59

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

danieldjohnson
Copy link
Collaborator

@danieldjohnson danieldjohnson commented Feb 17, 2025

For Tensors, we add requires_grad=True to the summary when that flag is set on the tensor.

For nn.Parameters, we assume gradients are required by default and add requires_grad=False when the parameter is frozen.

Summary shows regardless of whether or not autovizualization is on.

Fixes #51.

For `Tensor`s, we add requires_grad=True to the summary when
that flag is set on the tensor.

For `nn.Parameter`s, we assume gradients are required by default
and add requires_grad=False when the parameter is frozen.

Summary shows regardless of whether or not autovizualization is on.
@danieldjohnson danieldjohnson merged commit d08cd70 into main Feb 17, 2025
2 checks passed
@danieldjohnson danieldjohnson deleted the push-kqnvmoyloqlv branch February 17, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: distinguish the parameters that require grad and that is not for PyTorch models
1 participant