Improve error message format when reporting batch dimension mismatch in conv2d.
Before: input and out_backprop must have the same batch sizeinput batch: 2outbackprop batch: 1 batch_dim: 0 After: input and out_backprop must have the same batch size. Input batch: 2, outbackprop batch: 1 , batch_dim: 0 PiperOrigin-RevId: 324314629 Change-Id: I5e65341d545203209629933202d463374596b8e2
This commit is contained in:
parent
d5baa96fed
commit
5313d56b1e
@ -115,10 +115,10 @@ Status ConvBackpropComputeDimensionsV2(
|
||||
dims->batch_size = input_shape.dim_size(batch_dim);
|
||||
if (dims->batch_size != out_backprop_shape.dim_size(batch_dim)) {
|
||||
return errors::InvalidArgument(
|
||||
label, ": input and out_backprop must have the same batch size",
|
||||
"input batch: ", dims->batch_size,
|
||||
"outbackprop batch: ", out_backprop_shape.dim_size(batch_dim),
|
||||
" batch_dim: ", batch_dim);
|
||||
label, ": input and out_backprop must have the same batch size.",
|
||||
" Input batch: ", dims->batch_size,
|
||||
", outbackprop batch: ", out_backprop_shape.dim_size(batch_dim),
|
||||
", batch_dim: ", batch_dim);
|
||||
}
|
||||
|
||||
int feature_dim = GetTensorFeatureDimIndex(num_dims, data_format);
|
||||
|
Loading…
Reference in New Issue
Block a user