Skip to content

Commit

Permalink
fix output names for maskformer export
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Dec 18, 2024
1 parent 01929b2 commit 3fa346c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions optimum/exporters/onnx/model_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,12 @@ def outputs(self) -> Dict[str, Dict[int, str]]:
else:
return super().outputs

@property
def torch_to_onnx_output_map(self) -> Dict[str, str]:
return {
"transformer_decoder_last_hidden_state": "last_hidden_state",
}


class DonutSwinOnnxConfig(ViTOnnxConfig):
DEFAULT_ONNX_OPSET = 11
Expand Down

0 comments on commit 3fa346c

Please sign in to comment.