-
Notifications
You must be signed in to change notification settings - Fork 492
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
Optim-wip: Add descriptions and argument documentation to losses #831
Conversation
|
||
Args: | ||
target (nn.Module): The layer to optimize for. | ||
batch_index (int, optional): The index of the image to optimize if we |
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.
The batch_index
documentation is missing Default: None
below the description for all of the batch_index docs I think.
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 think that the batch index docs should look like this:
batch_index (int, optional): The index of activations to optimize if
optimizing a batch of activations. If set to None, defaults to all
activations in the batch.
Default: None
x (int, optional): The x coordinate of the neuron to optimize for. If | ||
unspecified, defaults to center, or one unit left of center for even | ||
lengths. | ||
y (int, optional): The y coordinate of the neuron to optimize for. If | ||
unspecified, defaults to center, or one unit up of center for even | ||
heights. |
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.
These docs are also missing Default: None
.
channel_index (int): The index of the channel to optimize for. | ||
cossim_pow (float, optional): The desired cosine similarity power to use. |
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.
These docs are missing their Default
settings.
x (int, optional): The x coordinate of the neuron to optimize for. If | ||
unspecified, defaults to center, or one unit left of center for even | ||
lengths. | ||
y (int, optional): The y coordinate of the neuron to optimize for. If | ||
unspecified, defaults to center, or one unit up of center for even | ||
heights. |
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.
These docs are missing Default: None
.
x (int, optional): The x coordinate of the neuron to optimize for. If | ||
unspecified, defaults to center, or one unit left of center for even | ||
lengths. | ||
y (int, optional): The y coordinate of the neuron to optimize for. If | ||
unspecified, defaults to center, or one unit up of center for even | ||
heights. | ||
wx (int, optional): Length of neurons to apply the weights to, along the | ||
x-axis. | ||
wy (int, optional): Length of neurons to apply the weights to, along the | ||
y-axis. |
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.
These docs are all missing Default: None
batch_index (int, optional): The index of the image to optimize if we | ||
optimizing a batch of images. If unspecified, defaults to all images | ||
in the batch. |
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'm not sure if we should be calling the activations images
in the batch index docs, as the activations can be images, or 2D / 4D activations.
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.
There's also a grammatical error in the batch_index docs: "optimize if we optimizing a batch of", should be "optimize if we are optimizing a batch of".
target (nn.Module): The layer to optimize for. | ||
constant (float): Constant threshold to deduct from the activations. | ||
Defaults to 0. | ||
epsilon (float): Small value to add to L2 prior to sqrt. Defaults to 1e-6. |
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 think the documentation format requires Default: <default_value>
on a separate line. Defaults can still however be mentioned in the description.
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.
The epsilon doc is also missing the optional
word
|
||
Args: | ||
target (nn.Module): The layer to optimize for. | ||
constant (float): Constant threshold to deduct from the activations. |
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.
The doc should be listed as optional, as there is a default value: constant (float, optional)
@ProGamerGov, @greentfrapp, I'm thinking to merge this first since it only contains docs and I don't see any merge conflicts. |
@NarineK Yeah, lets do that! |
No description provided.