Skip to content

Commit dfe1faf

Browse files
committed
raise runtime error when layer named input
1 parent 03fd5d4 commit dfe1faf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hls4ml/model/layers.py

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ def expected_attributes(cls):
3838
return all_attributes
3939

4040
def __init__(self, model, name, attributes, inputs, outputs=None):
41+
if name == 'input':
42+
raise RuntimeError("No model layer should be named 'input' because that is a reserved;" + \
43+
"layer name in ModelGraph; Please rename the layer in your model")
4144
self.model = model
4245
self.name = name
4346
self.index = model.next_layer()

0 commit comments

Comments
 (0)