keras_to_tensorflow
keras_to_tensorflow copied to clipboard
Get error converting this basic model
When I create the following model file and then try to convert it, I get an error:-
"TypeError: Keras symbolic inputs/outputs do not implement op. You may be trying to pass Keras symbolic inputs/outputs to a TF API that does not register dispatching, preventing Keras from automatically converting the API call to a lambda layer in the Functional Model."
Am I doing something wrong is is it a bug?
from keras.models import Model
from keras.models import Input
from keras.layers import Conv2D
# Build the model (this is a minimalist version of a much bigger model)
in_image = Input(shape=(256,256,3))
out_image = Conv2D(512, (4,4))(in_image)
model = Model(in_image, out_image)
model.compile()
# Save the model file
model.save("test_model.h5") #, include_optimizer=True
print("Saved OK")
I got the same issue...
There is a solution I founded. It works to me. https://www.olvidarkaka.com/contents/2403