-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Print Trainable
as a column
#54
Comments
Hi @joonas-yoon 👋 This is an interesting feature idea! Here is some feedback:
What do you think? |
Could you give me one example for multiple parameters? I have no idea about it but interesting. |
and for second thing, RAM consumption, how about save all of its state and restore them? obviously, it have to take more time and less performance. any idea? |
Hey there 👋 Well, for multiple parameters, almost all layers 😅 from torch import nn
# Create a fully connected layer
layer = nn.Linear(4, 8)
# Don't track grad on the weights
layer.weight.requires_grad_(False)
# But the bias is still loose
for n, p in layer.named_parameters():
print(n, p.requires_grad) which yields:
For the second part, I had the same in mind, I agree 👍 |
Oh I see. then, only for having different one, how about this?
no matter it has multiple lines. it's okay with single line as like |
Well, that will become hairy, I honestly don't want to spread on multiple lines.
|
good, I totally agree with you. one thing I want to suggest is, it needs to be noticed from documentation. for example, "False; contains partial mixed-trainable parameters" |
🚀 Feature
New column in summary,
Trainable
determines whether gradients need to be computed.We can know this from model's parameters easily:
In short, expected feature is:
Motivation & pitch
I have been trying transfering model with DenseNet, and got summary.
but there is no information which layer is trainable. this is the tail of result.
Alternatives
No response
Additional context
I will wait for your response. I want to hear what you think about this.
The text was updated successfully, but these errors were encountered: