Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jan 15, 2025
1 parent 18e887d commit 88a7e8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions optimum/onnxruntime/modeling_seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,9 @@ def forward(

last_hidden_state = output_buffers["last_hidden_state"].view(output_shapes["last_hidden_state"])
else:
onnx_inputs = self._prepare_onnx_inputs(use_torch, model_inputs)
onnx_inputs = self._prepare_onnx_inputs(use_torch, **model_inputs)
onnx_outputs = self.session.run(None, onnx_inputs)
model_outputs = self._prepare_model_outputs(use_torch, onnx_outputs)
model_outputs = self._prepare_model_outputs(use_torch, *onnx_outputs)

last_hidden_state = model_outputs["last_hidden_state"]

Expand Down Expand Up @@ -473,9 +473,9 @@ def forward(

last_hidden_state = output_buffers["last_hidden_state"].view(output_shapes["last_hidden_state"])
else:
onnx_inputs = self._prepare_onnx_inputs(use_torch, model_inputs)
onnx_inputs = self._prepare_onnx_inputs(use_torch, **model_inputs)
onnx_outputs = self.session.run(None, onnx_inputs)
model_outputs = self._prepare_model_outputs(use_torch, onnx_outputs)
model_outputs = self._prepare_model_outputs(use_torch, *onnx_outputs)

last_hidden_state = model_outputs["last_hidden_state"]

Expand Down

0 comments on commit 88a7e8b

Please sign in to comment.