pytorch/test/cpp_api_parity
Will Feng b5d15315d8 Improve C++ maxpool and avgpool (#26521)
Summary:
This PR makes the following improvements:
1. Add `forward_with_indices` method to all C++ MaxPool modules, to return the max indices along with the outputs. (We can't make two `forward` methods that return different types based on input, because that will break the type deduction of `torch::detail::return_type_of_forward_t`)
2. Add `max_poolNd_with_indices` to `torch::nn::functional`, to be used when indices of the max values are needed. (We can't merge this with `torch::nn::functional::max_poolNd` because the return type of `max_poolNd` has to be defined statically).
3. Improve `pretty_print` of C++ MaxPoolNd and AvgPoolNd modules to match the Python `extra_repr`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26521

Differential Revision: D17507358

Pulled By: yf225

fbshipit-source-id: b6c0e2b27b38378cdc0c75f4bfc797b3c6b17cd9
2019-09-25 13:52:58 -07:00
..
__init__.py Improve C++ maxpool and avgpool (#26521) 2019-09-25 13:52:58 -07:00
parity-tracker.md C++ Average Pool Module (#25800) 2019-09-11 16:39:56 -07:00
sample_module.py Improve C++ maxpool and avgpool (#26521) 2019-09-25 13:52:58 -07:00
torch_nn_modules.py Improve C++ maxpool and avgpool (#26521) 2019-09-25 13:52:58 -07:00