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

fix docstring - multiple or #1034

Closed
wants to merge 7 commits into from
Closed

fix docstring - multiple or #1034

wants to merge 7 commits into from

Conversation

aobo-y
Copy link
Contributor

@aobo-y aobo-y commented Sep 23, 2022

use only one or for multiple types

@@ -724,7 +724,7 @@ def _compute_jacobian_wrt_params(
It is unpacked before passing to `model`, so it must be a tuple. The
individual elements of `inputs` can be anything.
labels (Tensor or None): Labels for input if computing a loss function.
loss_fn (torch.nn.Module or Callable or None): The loss function. If a library
loss_fn (torch.nn.Module or Callable, optional): The loss function. If a library
Copy link
Contributor

@NarineK NarineK Sep 24, 2022

Choose a reason for hiding this comment

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

@aobo-y, for the case labels (Tensor or None) it is also option like loss_fn ? Do we want to fix that too. Line 795 is similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes, definitely, I can fix it too. Coz my original intention was to fix lines with multiple or connections, that line did not pop up in my regex search.

@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.

@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.

Infinity-ops added a commit to Infinity-ops/captum that referenced this pull request Oct 13, 2022
cyrjano pushed a commit to cyrjano/captum that referenced this pull request Oct 13, 2022
Summary:
use only one `or` for multiple types

Pull Request resolved: pytorch#1034

Reviewed By: vivekmig

Differential Revision: D40030553

Pulled By: aobo-y

fbshipit-source-id: 4fec520d82e3b7c200f6fdc50fd66e8ae71da8c1
cyrjano pushed a commit to cyrjano/captum that referenced this pull request Oct 13, 2022
Summary:
use only one `or` for multiple types

Pull Request resolved: pytorch#1034

Reviewed By: vivekmig

Differential Revision: D40030553

Pulled By: aobo-y

fbshipit-source-id: 4fec520d82e3b7c200f6fdc50fd66e8ae71da8c1
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.

None yet

4 participants