Skip to content

Commit

Permalink
fixed for openvino einsum
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdurrahheem committed May 22, 2024
1 parent 31a4a82 commit 536944d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/dnn/src/layers/einsum_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ class LayerEinsumImpl CV_FINAL : public EinsumLayer
} else {
// Check if there is a pre-processed version of this input
// If so assign it to result
if (!preProcessedInputs[0].empty())
if (!preProcessedInputs.empty() && !preProcessedInputs[0].empty())
{
result = preProcessedInputs[0];
}
Expand Down Expand Up @@ -541,7 +541,7 @@ class LayerEinsumImpl CV_FINAL : public EinsumLayer
// Use either the preprocessed inputs (if it is available) or the corresponding raw inputs
result = pairwiseOperandProcess(!result.empty() ? result : rawInputs[0],
!result.empty() ? tmpResult : homogenizedInputDims[0],
!preProcessedInputs[input].empty() ? preProcessedInputs[input] : rawInputs[input],
(!preProcessedInputs.empty() && !preProcessedInputs[input].empty()) ? preProcessedInputs[input] : rawInputs[input],
homogenizedInputDims[input],
reducedDims,
isFinalPair);
Expand Down

0 comments on commit 536944d

Please sign in to comment.