-
Notifications
You must be signed in to change notification settings - Fork 11
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
🗑 refactor(loss, nn, recipes, transforms, optim): remove unused local variables #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much!
Marking it as "Request change" so that I don't forget about the SelfAttention2d thingy
@@ -40,8 +40,6 @@ def step(self, closure=None): | |||
# Perform stepweight decay | |||
p.data.mul_(1 - group['lr'] * group['weight_decay']) | |||
|
|||
state = self.state[p] | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel quite good about removing this one actually. Commenting this line would feel better. I don't want to forget that there is an inherited state
dict that could be extremely helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which way could it be extremely helpful? Could a comment about that as a reminder instead of an unused variable be more fitting? 🙂
@@ -192,7 +192,6 @@ class PerceptualDiscriminator(nn.Module): | |||
@tu.experimental | |||
def __init__(self, n_downscales=4): | |||
super().__init__() | |||
layers = tu.FrozenModule(tch.models.PerceptualNet(layers)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disregard everything in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I take it as a request to keep this line in and revert this change from the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good!
No description provided.