Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
JanFSchulte committed Dec 13, 2024
1 parent 6ed9a84 commit 04862d4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions hls4ml/converters/pytorch_to_hls.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,15 @@ def parse_pytorch_model(config, verbose=True):
input_layers = None

for layer in layer_list:
if layer['class_name'] == 'InputLayer': continue
if layer['class_name'] == 'InputLayer':
continue
is_input = False
for l in layer_list:
if not 'inputs' in l.keys(): continue
if layer['name'] in l['inputs']: is_input = True
if not is_input:
for lay in layer_list:
if 'inputs' not in lay.keys():
continue
if layer['name'] in lay['inputs']:
is_input = True
if not is_input:
output_layers.append(layer['name'])
return layer_list, input_layers, output_layers

Expand Down

0 comments on commit 04862d4

Please sign in to comment.