More descriptive error message for Concat.
PiperOrigin-RevId: 316125402 Change-Id: I4f86104f4197fc1d2387d1914d5a9a54e965f31c
This commit is contained in:
parent
b58a02c186
commit
615cedf9d2
@ -75,7 +75,9 @@ Status Concat(const gtl::ArraySlice<Tensor>& tensors, Tensor* result) {
|
||||
for (int i = 1; i < tensors.size(); ++i) {
|
||||
if (tensors[i].dtype() != dtype) {
|
||||
return errors::InvalidArgument(
|
||||
"Cannot concatenate tensors that have different data types");
|
||||
"Cannot concatenate tensors that have different data types.", " Got ",
|
||||
DataTypeString(dtype), " and ", DataTypeString(tensors[i].dtype()),
|
||||
".");
|
||||
}
|
||||
}
|
||||
*result = Tensor(dtype, shape);
|
||||
|
Loading…
Reference in New Issue
Block a user