Skip to content
Snippets Groups Projects
Commit 7ef46dfc authored by Hendrik Borras's avatar Hendrik Borras
Browse files

Raised default for max_multithreshold_bit_width from 4 to 8, due to missing...

Raised default for max_multithreshold_bit_width from 4 to 8, due to missing quantization for 8-bit input test networks (CNV and mobilenet).
parent 72d2343d
No related branches found
No related tags found
No related merge requests found
......@@ -300,8 +300,8 @@ class DataflowBuildConfig:
#: only affects Quant nodes in the activation path. Quant nodes, which define a
#: bit width larger than `max_multithreshold_bit_width` are not converted to
#: MultiThreshold nodes and a warning is raised instead.
#: If not given `max_multithreshold_bit_width` defaults to 4.
max_multithreshold_bit_width: Optional[int] = 4
#: If not given `max_multithreshold_bit_width` defaults to 8.
max_multithreshold_bit_width: Optional[int] = 8
def _resolve_hls_clk_period(self):
if self.hls_clk_period_ns is None:
......
......@@ -54,7 +54,7 @@ class ConvertQONNXtoFINN(Transformation):
:param max_multithreshold_bit_width: The value of max_multithreshold_bit_width is
checked against the bit width of any given Quant node and the transformation to a
MultiTrheshold node is rejected, when the bitwidth of the Quant node is larger
than value of max_multithreshold_bit_with. Defaults to: 4
than value of max_multithreshold_bit_with. Defaults to: 8
:type max_multithreshold_bit_width: `int`, optional
:param filter_lambda: Each candidate Quant and BinaryQant node is first evaluated
by this lambda function. If the function returns False,
......@@ -64,7 +64,7 @@ class ConvertQONNXtoFINN(Transformation):
"""
def __init__(
self, max_multithreshold_bit_width=4, filter_lambda=lambda q_node: True
self, max_multithreshold_bit_width=8, filter_lambda=lambda q_node: True
):
super().__init__()
self.max_multithreshold_bit_width = max_multithreshold_bit_width
......
......@@ -47,7 +47,7 @@ class ConvertQuantActToMultiThreshold(Transformation):
:param max_multithreshold_bit_width: The value of max_multithreshold_bit_width is
checked against the bit width of any given Quant node and the transformation to a
MultiTrheshold node is rejected, when the bitwidth of the Quant node is larger
than value of max_multithreshold_bit_with. Defaults to: 4
than value of max_multithreshold_bit_with. Defaults to: 8
:type max_multithreshold_bit_width: `int`, optional
:param filter_lambda: Each candidate Quant and BinaryQant node is first evaluated
by this lambda function. If the function returns False,
......@@ -57,7 +57,7 @@ class ConvertQuantActToMultiThreshold(Transformation):
"""
def __init__(
self, max_multithreshold_bit_width=4, filter_lambda=lambda q_node: True
self, max_multithreshold_bit_width=8, filter_lambda=lambda q_node: True
):
super().__init__()
self.max_multithreshold_bit_width = max_multithreshold_bit_width
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment