Skip to content
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

update convert_full_model.py #34

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

xoqhdgh1002
Copy link

No description provided.

convert_full_model.py Outdated Show resolved Hide resolved
@xoqhdgh1002
Copy link
Author

xoqhdgh1002 commented Oct 22, 2024

Traceback (most recent call last):
  File "/home/btae/workspace/test/convert_full_model.py", line 71, in <module>
    hls_model = hls4ml.converters.convert_from_keras_model(model,**convert_options,output_dir=output_dir)
  File "/home/btae/Downloads/hls4ml/hls4ml/converters/__init__.py", line 234, in convert_from_keras_model
    return keras_to_hls(config)
  File "/home/btae/Downloads/hls4ml/hls4ml/converters/keras_to_hls.py", line 335, in keras_to_hls
    hls_model = ModelGraph(config, layer_list, input_layers, output_layers)
  File "/home/btae/Downloads/hls4ml/hls4ml/model/graph.py", line 347, in __init__
    raise RuntimeError(
RuntimeError: Currently only support the case when input variables and input layer names match
Input layers = ['input_cont', 'input_pxpy', 'input_cat0', 'input_cat1'], input_vars = ['input_cat0', 'input_cat1', 'input_cont', 'input_pxpy']

When I ran my code, I got this error message. Have you got the same error, or do you have any ideas about this?

@jmduarte
Copy link
Member

@xoqhdgh1002 can you share how you reproduce this error? I have seen the error before. It has to do with how hls4ml parses the inputs to a model (and they seemingly become out of order). I thought we resolved it in a more recent hls4ml version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants