Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce shape validation. #1716

Merged
merged 20 commits into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b03dc6f
Mention OrtCreateSessionFromArray in C API doc
pranavsharma Jul 22, 2019
cc5b316
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Jul 23, 2019
4ef6284
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Jul 25, 2019
85bd0dc
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Jul 25, 2019
42aa76c
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Jul 31, 2019
27ac7f1
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 7, 2019
8fdbd2e
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 8, 2019
704934b
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 13, 2019
10f46b4
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 14, 2019
3c64f87
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 15, 2019
d4d3008
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 16, 2019
d06cfbd
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 17, 2019
946be7a
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 19, 2019
0553e07
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 24, 2019
06bf1a8
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 28, 2019
615533c
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 28, 2019
0d7474c
Merge branch 'master' of https://github.com/Microsoft/onnxruntime
pranavsharma Aug 29, 2019
6e2a11a
Enforce shape validation.
pranavsharma Aug 29, 2019
c76fb61
Merge remote-tracking branch 'origin/master' into enforce_shape_checks
pranavsharma Aug 30, 2019
8d95377
Update broken models
pranavsharma Aug 31, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified csharp/testdata/test_types_BOOL.pb
Binary file not shown.
Binary file modified csharp/testdata/test_types_INT8.pb
Binary file not shown.
Binary file modified csharp/testdata/test_types_STRING.pb
Binary file not shown.
6 changes: 2 additions & 4 deletions onnxruntime/core/session/inference_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ common::Status InferenceSession::InitializeSubgraphSessions(Graph& graph, Sessio
ORT_RETURN_IF_ERROR(initializer.CreatePlan(&node, &implicit_inputs,
session_options_.enable_sequential_execution));


// LOGS(*session_logger_, VERBOSE) << std::make_pair(subgraph_info.session_state->GetExecutionPlan(),
// &*subgraph_info.session_state);

Expand Down Expand Up @@ -569,8 +568,7 @@ common::Status InferenceSession::CheckShapes(const std::string& input_name,
ostr << "Invalid rank for input: " << input_name
<< " Got: " << input_shape_sz << " Expected: " << expected_shape_sz
<< " Please fix either the inputs or the model.";
LOGS(*session_logger_, WARNING) << ostr.str();
return Status::OK();
return Status(ONNXRUNTIME, INVALID_ARGUMENT, ostr.str());
}

std::vector<int> invalid_dim_indices;
Expand All @@ -591,7 +589,7 @@ common::Status InferenceSession::CheckShapes(const std::string& input_name,
ostr << " index: " << idx << " Got: " << input_shape[idx] << " Expected: " << expected_shape[idx] << "\n";
}
ostr << " Please fix either the inputs or the model.";
LOGS(*session_logger_, WARNING) << ostr.str();
return Status(ONNXRUNTIME, INVALID_ARGUMENT, ostr.str());
}

return Status::OK();
Expand Down