[Solved] ValueError: Unknown initializer: GlorotUniform when using models.model_from_json(json)


Hi there, if you are trying to load tensorflow neural network model from json by using below code

1
models.model_from_json(json)

and getting this error

1
ValueError: Unknown initializer: GlorotUniform

then, change

1
models.model_from_json(json)

to

1
tf.keras.models.model_from_json(json)

I hope this change have solved your problems.
Thanks for reading! Happy coding :)

Comments