Skip to content

Commit 6b42724

Browse files
committed
-amend
1 parent 2d6403a commit 6b42724

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/onnxruntime.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ ModelInstanceState::ValidateOutputs()
15171517
if (model_state_->FindBatchOutput(io_name) == nullptr) {
15181518
// if max_batch_size == 0 and is a scalar tensor all the
15191519
// dimensions specified must be equal to 1
1520-
if (model_state_->MaxBatchSize() > 0 && iit->second.dims_.size() > 0) {
1520+
if (model_state_->MaxBatchSize() > 0 || iit->second.dims_.size() > 0) {
15211521
RETURN_IF_ERROR(CompareDimsSupported(
15221522
model_state_->Name(), io_name, iit->second.dims_, dims,
15231523
model_state_->MaxBatchSize(), true /* compare_exact */));
@@ -2362,7 +2362,7 @@ ModelInstanceState::ReadOutputTensors(
23622362
// configuration.
23632363
if (batchn_shape.size() == 0) {
23642364
auto scalar_output_dims_it = scalar_outputs_.find(name);
2365-
if (scalar_output_dims_it != scalar_outputs_.end()) {
2365+
if (scalar_output_dims_it == scalar_outputs_.end()) {
23662366
return TRITONSERVER_ErrorNew(
23672367
TRITONSERVER_ERROR_INTERNAL,
23682368
std::string(

0 commit comments

Comments
 (0)