Skip to content

Conversation

aobo-y
Copy link
Contributor

@aobo-y aobo-y commented Dec 16, 2022

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.

@aobo-y
Copy link
Contributor Author

aobo-y commented Dec 16, 2022

(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)

@facebook-github-bot
Copy link
Contributor

@aobo-y has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@NarineK NarineK left a 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.
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: concrete ?

@aobo-y
Copy link
Contributor Author

aobo-y commented Dec 19, 2022

Thanks @NarineK ! I will close this pr and fix all those typos in #1095 because @cyrjano suggested a better sphinx way to include inherited methods

@aobo-y aobo-y closed this Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants