Skip to content
Snippets Groups Projects
Commit b4d66ed4 authored by icolbert's avatar icolbert
Browse files

Fixing if-else logic to make more sense

parent 1add5a67
No related branches found
No related tags found
No related merge requests found
......@@ -652,8 +652,7 @@ class MatrixVectorActivation(HLSCustomOp):
def minimize_weight_bit_width(self, model):
"""Minimize the bit width based on the values of the weights"""
runtime_writable = self.get_nodeattr("runtime_writeable_weights") == 0
if runtime_writable:
if not self.get_nodeattr("runtime_writeable_weights"):
weights = model.get_initializer(self.onnx_node.input[1])
w_min = weights.min()
w_max = weights.max()
......
......@@ -171,8 +171,7 @@ class VectorVectorActivation(HLSCustomOp):
def minimize_weight_bit_width(self, model):
"""Minimize the bit width based on the values of the weights"""
runtime_writable = self.get_nodeattr("runtime_writeable_weights") == 0
if runtime_writable:
if not self.get_nodeattr("runtime_writeable_weights"):
weights = model.get_initializer(self.onnx_node.input[1])
w_min = weights.min()
w_max = weights.max()
......
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