-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'NoneType' object is not subscriptable #1027
Comments
I think this is fixed by #997. The model however is too large for hls4ml and won't work. |
So because of large model I can not use the hls4ml? |
I used a CNN model with 115,072 parameters and Model: x = Conv1D(32, 5, activation=None, padding='same', use_bias=False)(rf_in) x = Conv1D(32, 7, activation=None, padding='same', use_bias=False)(x) x = Conv1D(16, 3, activation=None, padding='same', use_bias=False)(x) x = Conv1D(16, 3, activation=None, padding='same', use_bias=False)(x) x = Flatten()(x) dense_1 = Dense(96, activation='selu', use_bias=False)(x) model = keras.Model(rf_in, softmax) model.summary() |
Probably a conversion error somewhere and the HLS model is not properly connected. The synthesis log will have plenty of warnings I assume |
I have a qkeras model. When I load model(load_qmodel) and I want to compile it I get this error.
I installed the last version of HLS4ML libarary.
Code:
model_path = 'weights-chkpt-11-0.657679.h5'
model = load_qmodel(model_path)
model.summary()
Result:
HLS Code:
import hls4ml
hls_config = hls4ml.utils.config_from_keras_model(model, granularity='model')
hls_config['Model']['ReuseFactor']=16
hls_config['Model']['Strategy']='Resource'
hls_config['LayerName']['output']['exp_table_t'] = 'ap_fixed<16,6>'
hls_config['LayerName']['output']['inv_table_t'] = 'ap_fixed<16,6>'
hls_config['LayerName']['output']['Strategy'] = 'Stable'
cfg = hls4ml.converters.create_config(backend='Vivado')
cfg['IOType'] = 'io_stream'
cfg['HLSConfig'] = hls_config
cfg['KerasModel'] = model
cfg['OutputDir'] = 'CNN_16_6_16_q'
hls_model = hls4ml.converters.convert_from_keras_model(hls_config=cfg, backend='VivadoAccelerator', part='xczu7ev-ffvc1156-2-e')
hls_model.compile()
print('NOW is finished')
Result:
I appreciate for your response.
The text was updated successfully, but these errors were encountered: