You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, in principle the model seems to be defined well. But when loading it into hls4ml somehow the input layer seems to duplicate and rises the exception. I am loading the model from a directory including the .pb file.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
when calling:
hls_model = hls4ml.converters.keras_to_hls(cfg)
I am getting an exception:
Interpreting Model
Topology:
Layer name: waveforms, layer type: InputLayer, input shapes: [[None, 30, 30, 5]], output shape: [None, 30, 30, 5]
Interpreting Model
Topology:
Layer name: waveforms, layer type: InputLayer, input shapes: [[None, 30, 30, 5]], output shape: [None, 30, 30, 5]
Layer name: SingleCNN_block_wvf_conv_1_1, layer type: Conv2D, input shapes: [[None, 30, 30, 5]], output shape: [None, 30, 30, 32]
Layer name: SingleCNN_block_wvf_pool_1, layer type: MaxPooling2D, input shapes: [[None, 30, 30, 32]], output shape: [None, 15, 15, 32]
Layer name: SingleCNN_block_wvf_conv_2_1, layer type: Conv2D, input shapes: [[None, 15, 15, 32]], output shape: [None, 15, 15, 32]
Layer name: SingleCNN_block_wvf_pool_2, layer type: MaxPooling2D, input shapes: [[None, 15, 15, 32]], output shape: [None, 7, 7, 32]
Layer name: SingleCNN_block_wvf_conv_3_1, layer type: Conv2D, input shapes: [[None, 7, 7, 32]], output shape: [None, 7, 7, 64]
Layer name: SingleCNN_block_wvf_pool_3, layer type: MaxPooling2D, input shapes: [[None, 7, 7, 64]], output shape: [None, 3, 3, 64]
Layer name: SingleCNN_block_wvf_flatten, layer type: Reshape, input shapes: [[None, 3, 3, 64]], output shape: [None, 576]
Layer name: SingleCNN_block, layer type: LayerGroup, input shapes: [[None, 30, 30, 5]], output shape: [None, 576]
Layer name: fc_particletype_1, layer type: Dense, input shapes: [[None, 576]], output shape: [None, 256]
Layer name: fc_particletype_2, layer type: Dense, input shapes: [[None, 256]], output shape: [None, 64]
Layer name: particletype, layer type: Dense, input shapes: [[None, 64]], output shape: [None, 3]
Layer name: type, layer type: Softmax, input shapes: [[None, 3]], output shape: [None, 3]
Creating HLS model
[...]
Exception: Layer names must be unique: "waveforms" already found in the model graph.
If I get a summary of the keras model with:
model.summary()
Layer (type) Output Shape Param #
waveforms (InputLayer) [(None, 30, 30, 5)] 0
SingleCNN_block (Functiona (None, 576) 29216
l)
fc_particletype_1 (Dense) (None, 256) 147712
fc_particletype_2 (Dense) (None, 64) 16448
particletype (Dense) (None, 3) 195
type (Softmax) (None, 3) 0
=================================================================
Total params: 193571 (756.14 KB)
Trainable params: 193571 (756.14 KB)
Non-trainable params: 0 (0.00 Byte)
So, in principle the model seems to be defined well. But when loading it into hls4ml somehow the input layer seems to duplicate and rises the exception. I am loading the model from a directory including the .pb file.
Any feedback is welcomed.
Beta Was this translation helpful? Give feedback.
All reactions