Provide more diagnostic shape information in output window error message.
authorVijay Vasudevan <vrv@google.com>
Mon, 12 Feb 2018 05:19:37 +0000 (21:19 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 12 Feb 2018 05:23:00 +0000 (21:23 -0800)
PiperOrigin-RevId: 185331713

tensorflow/core/framework/common_shape_fns.cc

index 8bb8748..623248b 100644 (file)
@@ -49,7 +49,11 @@ Status GetWindowedOutputSizeVerboseV2(int64 input_size, int64 filter_size,
       break;
   }
   if (*output_size < 0) {
-    return errors::InvalidArgument("computed output size would be negative");
+    return errors::InvalidArgument(
+        "Computed output size would be negative: ", *output_size,
+        " [input_size: ", input_size,
+        ", effective_filter_size: ", effective_filter_size,
+        ", stride: ", stride, "]");
   }
   return Status::OK();
 }