pytorch
d4b4d835 - [quant] handle empty input in fused_moving_avg_obs_fake_quant op (#64829)

Commit
4 years ago
[quant] handle empty input in fused_moving_avg_obs_fake_quant op (#64829) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/64829 If an empty input is passed in, the aminmax operator fails with a runtime error like ``` RuntimeError: aminmax(): cannot compute aminmax over an empty dimension as the operation has no identity. ``` To avoid this during training we just return the input if we find it to be empty Test Plan: python test/test_quantization.py TestFusedObsFakeQuant Imported from OSS Reviewed By: jingsh Differential Revision: D30870879 fbshipit-source-id: 0cb4b187449a45a37150a77510d2292f93a7d1cd
Author
Parents
Loading