pytorch/test/cpp_api_parity
Joel Schlosser 68d438c9da Add PixelUnshuffle (#49334)
Summary:
Adds an implementation of `torch.nn.PixelUnshuffle` as the inverse operation of `torch.nn.PixelShuffle`. This addresses https://github.com/pytorch/pytorch/issues/2456

Pull Request resolved: https://github.com/pytorch/pytorch/pull/49334

Test Plan:
```
# Unit tests.
python test/test_nn.py TestNN.test_pixel_shuffle_unshuffle

# Module test.
python test/test_nn.py TestNN.test_PixelUnshuffle

# C++ API tests.
build/bin/test_api

# C++ / python parity tests.
python test/test_cpp_api_parity.py

# JIT test.
python test/test_jit.py TestJitGeneratedFunctional.test_nn_pixel_unshuffle

# Override tests.
python test/test_overrides.py

# Type hint tests.
python test/test_type_hints.py
```

Screenshots of rendered docs:
<img width="876" alt="Screen Shot 2020-12-18 at 12 19 05 PM" src="https://user-images.githubusercontent.com/75754324/102642255-6b07bb00-412b-11eb-88fa-e53e7e8ba720.png">
<img width="984" alt="Screen Shot 2020-12-18 at 12 19 26 PM" src="https://user-images.githubusercontent.com/75754324/102642276-70fd9c00-412b-11eb-8548-445082a2db02.png">
<img width="932" alt="Screen Shot 2020-12-18 at 12 19 34 PM" src="https://user-images.githubusercontent.com/75754324/102642704-19abfb80-412c-11eb-9546-95bdd1c3cf22.png">
<img width="876" alt="Screen Shot 2020-12-22 at 12 51 36 PM" src="https://user-images.githubusercontent.com/75754324/102918259-986aa680-4454-11eb-99e7-a0b4c8b3e283.png">
<img width="869" alt="Screen Shot 2020-12-22 at 12 51 44 PM" src="https://user-images.githubusercontent.com/75754324/102918274-9ef91e00-4454-11eb-94bb-91b58aff47d3.png">

Reviewed By: mruberry

Differential Revision: D25401439

Pulled By: jbschlosser

fbshipit-source-id: 209d92ce7295e51699e83616d0c62170a7ce75c8
2020-12-22 20:14:55 -08:00
..
__init__.py remediation of S205607 2020-07-17 17:19:47 -07:00
functional_impl_check.py Updates assertEqual to require atol and rtol, removes positional atol (#38872) 2020-05-27 06:31:07 -07:00
module_impl_check.py Updates assertEqual to require atol and rtol, removes positional atol (#38872) 2020-05-27 06:31:07 -07:00
parity_table_parser.py Refactor C++ API parity test mechanism and turn it on in CI again (#35190) 2020-04-03 11:20:36 -07:00
parity-tracker.md Add PixelUnshuffle (#49334) 2020-12-22 20:14:55 -08:00
sample_functional.py Refactor C++ API parity test mechanism and turn it on in CI again (#35190) 2020-04-03 11:20:36 -07:00
sample_module.py Refactor C++ API parity test mechanism and turn it on in CI again (#35190) 2020-04-03 11:20:36 -07:00
utils.py Rename NewCriterionTest to CriterionTest. (#44056) 2020-09-03 10:29:20 -07:00