r2.11 cherry-pick: 948fe6369a5 "Fix nn.conv3d_transpose security vulnerability with illegal input shape"
Refer to the original commit: https://github.com/tensorflow/tensorflow/commit/948fe6369a5711d4b4568ea9bbf6015c6dfb77e2