-
Notifications
You must be signed in to change notification settings - Fork 543
add dummy wrapper for stg public api #1093
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
Conversation
(not sure if sphinx provides better way to do this. It is a little bit annoying that I have to copy the same docstring into multiple places) |
@aobo-y has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
LGTM! Thank you!
gate_values (Tensor): value of each gate in shape(n_gates) | ||
|
||
clamp (bool): if clamp the gate values. As smoothed Bernoulli | ||
variables, gate values are clamped withn 0 and 1 by defautl. |
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.
nit: default ?
gate_values (Tensor): value of each gate in shape(n_gates) | ||
|
||
clamp (bool): if clamp the gate values. As smoothed Bernoulli | ||
variables, gate values are clamped withn 0 and 1 by defautl. |
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.
nit: default ?
Returns: | ||
gate_values (Tensor): value of each gate in shape(n_gates) | ||
|
||
clamp (bool): if clamp the gate values. As smoothed Bernoulli |
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.
nit: maybe indicates whether to clamp the gate values or not
? (also in gaussian stochastic gates)
clamp (bool): if clamp the gate values. As smoothed Bernoulli | ||
variables, gate values are clamped withn 0 and 1 by defautl. | ||
Turn this off to get the raw means of the underneath | ||
distribution (e.g., conrete, gaussian), which can be useful to |
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.
nit: concrete ?
These functions are actually implemented in the abstract parent class
StochasticGatesBase
, but need to create these dummy wrappers in children so that sphinx can correctly generate documentation for these methods.