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

🗑 refactor(loss, nn, recipes, transforms, optim): remove unused local variables #9

Merged
merged 7 commits into from
Apr 28, 2021

Conversation

Horgix
Copy link
Collaborator

@Horgix Horgix commented Apr 28, 2021

No description provided.

Copy link
Owner

@Vermeille Vermeille left a 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

torchelie/nn/layers.py Show resolved Hide resolved
torchelie/loss/neuralstyleloss.py Show resolved Hide resolved
torchelie/loss/neuralstyleloss.py Show resolved Hide resolved
torchelie/nn/functional/vq.py Show resolved Hide resolved
torchelie/nn/resblock.py Show resolved Hide resolved
@@ -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]

Copy link
Owner

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.

Copy link
Collaborator Author

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))
Copy link
Owner

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.

Copy link
Collaborator Author

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?

torchelie/transforms/__init__.py Show resolved Hide resolved
Copy link
Owner

@Vermeille Vermeille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good!

@Vermeille Vermeille merged commit 02a9f2f into Vermeille:master Apr 28, 2021
@Horgix Horgix added the refactoring Stuff to refactor (without features impact) label May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Stuff to refactor (without features impact)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants