forked from flashlight/flashlight
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Tensor argmin and argmax + min/max that return indices (flashligh…
…t#732) Summary: Pull Request resolved: flashlight#732 See title - mirror numpy's [`argmax`](https://numpy.org/doc/stable/reference/generated/numpy.argmax.html) and [`argmin`](https://numpy.org/doc/stable/reference/generated/numpy.argmin.html) per naming Also mirrors Torch/adds [`min`](https://pytorch.org/docs/stable/generated/torch.min.html) and [`max`](https://pytorch.org/docs/stable/generated/torch.max.html) funcs that return both values and indices. Requires an axis argument - can add an overload later - one can use `Tensor::flat()` to perform the op over the entire tensor. Reviewed By: benoitsteiner Differential Revision: D30545502 fbshipit-source-id: 415755c46237d81028232ba398b8bd0302764f4a
- Loading branch information
1 parent
91c8c90
commit ee05861
Showing
10 changed files
with
311 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.