mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-17 21:10:43 +00:00
Make PythonOp report dtype mismatch by name, instead of by using enum index (#13007)
This commit is contained in:
parent
77b567df66
commit
0ddf4efbd9
1 changed files with 3 additions and 1 deletions
|
|
@ -3682,7 +3682,9 @@ Return true if all elements are true and false otherwise.
|
|||
ORT_ENFORCE(inferred_input_type->value_case() == TypeProto::kTensorType,
|
||||
"PythonOp's ", i, "th input type must be a tensor.");
|
||||
ORT_ENFORCE(inferred_input_type->tensor_type().elem_type() == input_tensor_types_proto->ints().at(i),
|
||||
"PythonOp's ", i, "th input type must be ", input_tensor_types_proto->ints().at(i));
|
||||
"PythonOp's ", i, "th input type must be ",
|
||||
TensorProto_DataType_Name(input_tensor_types_proto->ints().at(i)), " but got ",
|
||||
TensorProto_DataType_Name(inferred_input_type->tensor_type().elem_type()));
|
||||
}
|
||||
|
||||
// The first output is a pointer which points to
|
||||
|
|
|
|||
Loading…
Reference in a new issue