Fixing 'nothing to do' test in depthwise backward filter kernel for GPU.
authorA. Unique TensorFlower <gardener@tensorflow.org>
Fri, 11 May 2018 09:39:15 +0000 (02:39 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 11 May 2018 09:44:07 +0000 (02:44 -0700)
PiperOrigin-RevId: 196233957

tensorflow/core/kernels/depthwise_conv_grad_op.cc

index 7afa21a..42a4832 100644 (file)
@@ -1076,7 +1076,7 @@ class DepthwiseConv2dNativeBackpropFilterOp : public OpKernel {
                                 {1}, 0, filter_shape, &filter_backprop));
 
     // If there is nothing to compute, return.
-    if (filter_shape.num_elements() == 0) {
+    if (out_backprop.shape().num_elements() == 0) {
       return;
     }