File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ def initialize(self):
357
357
358
358
359
359
class Constant (Layer ):
360
- # one could consider making this a weight attribute, but given it's transient nature, I am not sure it helps
360
+ # one could consider making this a weight attribute, but given its transient nature, I am not sure it helps
361
361
_expected_attributes = [
362
362
Attribute ('value' , value_type = np .ndarray ),
363
363
]
@@ -371,6 +371,10 @@ def initialize(self):
371
371
dims = [f'{ self .name } _{ i } ' for i in range (len (shape ))]
372
372
quantizer = self .get_attr ('quantizer' )
373
373
374
+ # the graph._make_graph function sets the input node to the previous node
375
+ # if it is not set. That is incorrect for Constant nodes, so remove the input node
376
+ self .inputs = []
377
+
374
378
# Should the else clause below be None or UnspecifiedPrecisionType
375
379
precision = quantizer .hls_type if quantizer is not None else UnspecifiedPrecisionType ()
376
380
You can’t perform that action at this time.
0 commit comments