Skip to content

Commit

Permalink
remove output only if multiple output
Browse files Browse the repository at this point in the history
  • Loading branch information
calad0i committed Dec 13, 2023
1 parent 9804cce commit 69011fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hls4ml/model/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ def make_node(self, kind, name, attributes, inputs, outputs=None):
node = layer_cls(self, name, attributes, inputs, outputs)
for o in node.outputs:
out_var = node.get_output_variable(output_name=o)
if o in self.outputs:
out_var.type.name = 'result_' + out_var.type.name
if len(self.outputs) == 1 and o in self.outputs:
out_var.type.name = 'result_t'
self.output_vars[o] = out_var
return node

Expand Down Expand Up @@ -608,8 +608,8 @@ def get_input_variables(self):
return variables

def register_output_variable(self, out_name, variable):
if out_name in self.outputs:
variable.type.name = 'result_' + variable.type.name
if len(self.outputs) == 1 and out_name in self.outputs:
variable.type.name = 'result_t'
self.output_vars[out_name] = variable

def get_output_variables(self):
Expand Down

0 comments on commit 69011fa

Please sign in to comment.