Skip to content

error in config #1280

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

Open
Gabriel-MarcoSilva opened this issue Apr 28, 2025 · 1 comment
Open

error in config #1280

Gabriel-MarcoSilva opened this issue Apr 28, 2025 · 1 comment
Labels

Comments

@Gabriel-MarcoSilva
Copy link

Quick summary

This is the error that appears:

10 layer = parse_default_keras_layer(keras_layer, input_names)

11
---> 12 layers['input_shape'] = keras_layer['config']['batch_input_shape'][1:]

13
14 dtype = keras_layer['config']['dtype']

KeyError: 'batch_input_shape'

Details

I'm using python3.12.3, tensorflow 2.17, but when I use an environment with python3.10 and tensorflow 2.14 I get some error

Steps to reproduce

Just run the command from the quickstart itself:

config=hls4ml.utils.config_from_keras_model( model, granularity='name' )

Expected behavior

it would have executed the configuration

Actual behavior

10 layer = parse_default_keras_layer(keras_layer, input_names)
11
---> 12 layer['input_shape'] = keras_layer['config']['batch_input_shape'][1:]
13
14 dtype = keras_layer['config']['dtype']

KeyError: 'batch_input_shape'

@calad0i
Copy link
Contributor

calad0i commented May 5, 2025

tf2.16 is the last version supports keras v2, and tf2.17 is fully based on keras v3, which is not officially supported yet in the main branch. Try PR #1116 if you want to use keras v3.

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

No branches or pull requests

2 participants