We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26b4c54 commit 702e4ebCopy full SHA for 702e4eb
hls4ml/backends/fpga/passes/inplace_stream_flatten.py
@@ -12,11 +12,9 @@ class InplaceStreamFlatten(OptimizerPass):
12
13
def match(self, node):
14
# Reshape acts as a Flatten layer when the result has 1 dimension
15
- if not (isinstance(node, Reshape)):
+ if not (isinstance(node, Reshape) and len(node.get_output_variable().shape)) == 1:
16
# Reshape with multiple outputs will be kept as is, or repack cannot handle different shapes
17
return False
18
- if len(node.get_output_variable().shape) + (node.name in node.model.outputs) != 1:
19
- return False
20
io_type = node.model.config.get_config_value('IOType')
21
return io_type == 'io_stream'
22
0 commit comments