Skip to content

Commit

Permalink
Fix config attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
tea-de-kay committed Aug 8, 2023
1 parent 3fa2531 commit fc47cc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.py[cod]
4 changes: 2 additions & 2 deletions onnx_transformers/model_for_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_output_dim(self) -> int:

if isinstance(shape, str):
logging.warning("cannot determine output shape from onnx session. try to return dim from config")
assert "dim" in self.model_config.config, "cannot determine output dim"
return self.model_config.dim
assert "dim" in self.model_config, "cannot determine output dim"
return self.model_config.get("dim")
# noinspection PyTypeChecker
return shape

0 comments on commit fc47cc3

Please sign in to comment.