Minor change for better error msg in eager input type checking

PiperOrigin-RevId: 206058281
This commit is contained in:
James Qin 2018-07-25 14:44:18 -07:00 committed by TensorFlower Gardener
parent 438c8e2b0a
commit f0bf6c5191

View File

@ -175,7 +175,7 @@ Status ValidateInputTypeAndPlacement(EagerContext* ctx, Device* op_device,
tensorflow::TensorHandle* handle = op->Inputs()[i];
if (handle->dtype != kernel->input_type(i)) {
return errors::InvalidArgument(
"cannot compute ", op->Name(), " as input #", i,
"cannot compute ", op->Name(), " as input #", i, "(zero-based)",
" was expected to be a ", DataTypeString(kernel->input_type(i)),
" tensor but is a ", DataTypeString(handle->dtype), " tensor");
}