Skip to content

Commit 7b58c1d

Browse files
committed
typo and docstring
1 parent bf6fe7a commit 7b58c1d

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

hls4ml/backends/fpga/passes/inplace_stream_flatten.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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) and len(node.get_output_variable().shape)) == 1:
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
1818
return node.model.config.get_config_value('IOType') == 'io_stream'

hls4ml/model/graph.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -518,22 +518,23 @@ def insert_node(self, node, before=None, input_idx=0):
518518
self.graph = new_graph
519519

520520
def remove_node(self, node, rewire=True):
521-
"""Remove a node from a graph.
521+
"""Removes a node from the graph.
522522
523-
By default, this function can connect the outputs of previous
524-
node to the input of next one. If the removed node has multiple
525-
inputs/outputs tensors, an exception is raised.
523+
By default, this function connects the outputs of the previous
524+
node to the inputs of the next node. If the removed node has multiple
525+
input/output tensors, an exception is raised.
526526
527-
:param node: The node to remove.
528-
:type node: Layer
529-
:param rewire: Deprecated, no effect.
530-
:type rewire: bool, optional
527+
Args:
528+
node (Layer): The node to remove.
529+
rewire (bool, optional): Deprecated, has no effect.
531530
532-
:raises Exception: If an attempt is made to rewire a node with
533-
multiple inputs/outputs.
531+
Raises:
532+
Exception: If an attempt is made to rewire a node with
533+
multiple inputs/outputs.
534534
535-
.. deprecated:: 1.0
536-
The `rewire` parameter is deprecated and has no effect."""
535+
Note:
536+
The `rewire` parameter is deprecated and has no effect.
537+
"""
537538

538539
inputs = [inp for inp in node.inputs if inp]
539540
outputs = [outp for outp in node.outputs if outp]

0 commit comments

Comments
 (0)