Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

handle list of names #654

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions keras2onnx/_parser_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,12 @@ def extract_outputs_from_inbound_nodes(model):
output_tensors = [nd_.output_tensors] if hasattr(nd_.output_tensors, 'dtype') else \
nd_.output_tensors
for ts_ in output_tensors:
op_name = tsname_to_node(ts_.name)
if op_name not in output_dict:
output_dict[op_name] = (model, None)

if not isinstance(ts_, (tuple, list)):
ts_ = [ts_]
for ts__ in ts_:
op_name = tsname_to_node(ts__.name)
if op_name not in output_dict:
output_dict[op_name] = (model, None)
for ts_ in _get_output_mask(model):
if ts_ is not None:
output_dict[ts_.op.name] = (model, model)
Expand Down