Yanghan Wang
d08250c223
fix zero-batch handling in convtranspose ( #24341 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/24341
ConvTransposeOp doesn't crash for zero-batch, but it doesn't modify the output blob. This leads to buggy behaviour especially when running the same network twice using different input, or backprop during training.
Seems `ConvTransposeUnpoolBase<Context>::GetOutputSize` works for zero-batch, so I remove the check for `input.numel() > 0`, and reshape the output blob before returning.
For CudnnConvTransposeGradientOp, it's a bit verbose to set `dfilter` and `dbias`, it's a seems the Cudnn can handle it, so simply remove the `X.numel() == 0` branch.
Test Plan: buck test mode/dev-nosan caffe2/caffe2/python/operator_test:conv_transpose_test -- --run-disabled
Reviewed By: BIT-silence
Differential Revision: D16807606
fbshipit-source-id: 0d72c5bd8f2e03c34465e7b530cca548d9bdd5e1
2019-12-18 15:06:36 -08:00
..
2019-01-05 08:53:35 -08:00
2019-11-08 10:39:17 -08:00
2019-05-03 15:33:46 -07:00
2019-10-08 21:31:11 -07:00
2019-12-10 10:18:21 -08:00
2018-12-11 16:54:08 -08:00
2019-04-10 12:04:39 -07:00
2019-12-02 20:17:42 -08:00
2019-12-02 20:17:42 -08:00
2019-12-10 10:15:08 -08:00
2019-12-18 15:06:36 -08:00
2019-11-18 11:26:49 -08:00
2018-11-29 14:00:16 -08:00
2019-07-02 17:29:13 -07:00
2019-04-03 13:17:08 -07:00
2019-11-01 12:53:01 -07:00
2019-03-01 10:37:27 -08:00
2019-04-03 13:17:08 -07:00
2019-04-16 19:04:06 -07:00
2019-06-19 18:15:32 -07:00
2019-01-09 15:36:53 -08:00
2019-01-09 15:36:53 -08:00
2019-05-10 07:00:58 -07:00
2018-12-11 10:48:47 -08:00
2018-11-29 14:00:16 -08:00
2019-09-26 20:44:03 -07:00
2019-01-30 18:42:12 -08:00
2019-02-20 21:12:24 -08:00
2019-09-17 04:01:36 -07:00
2019-02-08 15:48:42 -08:00
2019-09-23 13:01:00 -07:00
2019-12-02 20:17:42 -08:00
2019-11-06 13:29:23 -08:00
2019-07-10 11:56:56 -07:00
2019-11-05 16:53:53 -08:00
2019-10-10 13:53:58 -07:00
2019-05-06 15:06:32 -07:00
2019-12-02 20:17:42 -08:00
2019-09-13 11:38:14 -07:00
2019-07-17 10:26:25 -07:00
2019-04-08 11:54:10 -07:00
2019-02-07 00:29:51 -08:00
2019-06-06 20:48:47 -07:00
2019-08-13 05:32:41 -07:00
2019-12-02 20:17:42 -08:00
2019-12-02 20:17:42 -08:00
2019-04-17 21:10:38 -07:00
2019-12-10 10:18:21 -08:00
2019-02-20 13:14:11 -08:00
2019-12-02 20:17:42 -08:00
2019-02-07 00:29:51 -08:00
2019-12-02 20:17:42 -08:00
2019-02-07 00:29:51 -08:00
2019-12-02 20:17:42 -08:00
2019-12-02 20:17:42 -08:00
2019-12-16 13:57:19 -08:00
2018-11-29 14:00:16 -08:00
2018-11-29 14:00:16 -08:00
2019-02-12 15:02:50 -08:00
2019-06-13 15:21:55 -07:00
2018-11-16 08:19:20 -08:00
2018-11-01 14:27:07 -07:00
2018-11-01 14:27:07 -07:00
2019-12-02 20:17:42 -08:00
2018-12-07 10:01:25 -08:00
2018-12-12 12:21:10 -08:00
2019-03-16 12:28:05 -07:00
2019-12-02 20:17:42 -08:00
2019-12-02 20:17:42 -08:00
2019-11-18 15:22:37 -08:00
2019-11-18 15:22:37 -08:00
2019-11-01 13:59:02 -07:00
2019-10-22 15:37:31 -07:00
2019-02-07 00:29:51 -08:00
2019-12-02 20:17:42 -08:00
2018-11-12 15:59:46 -08:00
2019-01-02 16:36:37 -08:00
2019-05-28 19:58:54 -07:00
2019-11-04 16:40:29 -08:00
2019-04-03 12:47:17 -07:00
2018-11-16 08:19:20 -08:00
2019-12-10 00:35:11 -08:00
2019-09-18 02:02:34 -07:00
2018-11-07 09:16:13 -08:00
2019-12-02 20:17:42 -08:00
2019-07-17 16:12:31 -07:00
2019-12-02 20:17:42 -08:00
2018-11-29 14:00:16 -08:00
2019-07-02 11:27:37 -07:00
2019-12-02 20:17:42 -08:00
2018-12-12 01:39:50 -08:00
2018-12-12 01:39:50 -08:00
2019-12-02 20:17:42 -08:00
2019-05-20 19:09:22 -07:00
2018-12-17 16:02:16 -08:00
2019-12-02 20:17:42 -08:00
2019-03-25 16:58:34 -07:00
2019-04-01 10:36:23 -07:00
2018-11-08 00:02:37 -08:00
2019-03-12 20:10:46 -07:00
2019-03-29 19:00:48 -07:00
2018-11-01 14:27:05 -07:00
2019-06-13 23:41:04 -07:00
2019-11-08 09:11:20 -08:00
2019-11-13 10:30:10 -08:00