Skip to content

Commit

Permalink
-amend
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrizian committed Sep 21, 2023
1 parent 2d6403a commit 6b42724
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/onnxruntime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ ModelInstanceState::ValidateOutputs()
if (model_state_->FindBatchOutput(io_name) == nullptr) {
// if max_batch_size == 0 and is a scalar tensor all the
// dimensions specified must be equal to 1
if (model_state_->MaxBatchSize() > 0 && iit->second.dims_.size() > 0) {
if (model_state_->MaxBatchSize() > 0 || iit->second.dims_.size() > 0) {
RETURN_IF_ERROR(CompareDimsSupported(
model_state_->Name(), io_name, iit->second.dims_, dims,
model_state_->MaxBatchSize(), true /* compare_exact */));
Expand Down Expand Up @@ -2362,7 +2362,7 @@ ModelInstanceState::ReadOutputTensors(
// configuration.
if (batchn_shape.size() == 0) {
auto scalar_output_dims_it = scalar_outputs_.find(name);
if (scalar_output_dims_it != scalar_outputs_.end()) {
if (scalar_output_dims_it == scalar_outputs_.end()) {
return TRITONSERVER_ErrorNew(
TRITONSERVER_ERROR_INTERNAL,
std::string(
Expand Down

0 comments on commit 6b42724

Please sign in to comment.