From aea6e3fa75a49f442a649332cc514f7cf31c38d2 Mon Sep 17 00:00:00 2001 From: Vijay Vasudevan Date: Sun, 11 Feb 2018 21:19:37 -0800 Subject: [PATCH] Provide more diagnostic shape information in output window error message. PiperOrigin-RevId: 185331713 --- tensorflow/core/framework/common_shape_fns.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tensorflow/core/framework/common_shape_fns.cc b/tensorflow/core/framework/common_shape_fns.cc index 8bb8748..623248b 100644 --- a/tensorflow/core/framework/common_shape_fns.cc +++ b/tensorflow/core/framework/common_shape_fns.cc @@ -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(); } -- 2.7.4