Skip to content

Commit

Permalink
remove non tensors from middle layers (#160)
Browse files Browse the repository at this point in the history
* remove non tensors from middle layers

* 0.0.140
  • Loading branch information
doronHarnoy authored Jul 28, 2024
1 parent 1d4a483 commit 75a232a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion onnx2kerastl/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ def onnx_to_keras(onnx_model, input_names, name_policy=None, verbose=True, chang
for inp in node.input:
keras_middle_outputs.pop(inp, None)
# add node to middle map
keras_middle_outputs[node_name] = layers[node_name]
if tf.is_tensor(layers[node_name]):
keras_middle_outputs[node_name] = layers[node_name]

if isinstance(keras_names, list):
keras_names = keras_names[0]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "onnx2kerastl"
version = "0.0.139"
version = "0.0.140"
description = ""
authors = ["dorhar <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 75a232a

Please sign in to comment.