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):
357357
358358
359359class 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
361361 _expected_attributes = [
362362 Attribute ('value' , value_type = np .ndarray ),
363363 ]
@@ -371,6 +371,10 @@ def initialize(self):
371371 dims = [f'{ self .name } _{ i } ' for i in range (len (shape ))]
372372 quantizer = self .get_attr ('quantizer' )
373373
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+
374378 # Should the else clause below be None or UnspecifiedPrecisionType
375379 precision = quantizer .hls_type if quantizer is not None else UnspecifiedPrecisionType ()
376380
You can’t perform that action at this time.
0 commit comments