Skip to content

Commit 702e4eb

Browse files
committed
rm ill-condition
_
1 parent 26b4c54 commit 702e4eb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

hls4ml/backends/fpga/passes/inplace_stream_flatten.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ class InplaceStreamFlatten(OptimizerPass):
1212

1313
def match(self, node):
1414
# Reshape acts as a Flatten layer when the result has 1 dimension
15-
if not (isinstance(node, Reshape)):
15+
if not (isinstance(node, Reshape) and len(node.get_output_variable().shape)) == 1:
1616
# Reshape with multiple outputs will be kept as is, or repack cannot handle different shapes
1717
return False
18-
if len(node.get_output_variable().shape) + (node.name in node.model.outputs) != 1:
19-
return False
2018
io_type = node.model.config.get_config_value('IOType')
2119
return io_type == 'io_stream'
2220

0 commit comments

Comments
 (0)