0

This problem is very similar to this question and this other question However it is not a duplicate question for the reasons I am going to explain.

The premise is the same: I trained a model in Keras (TensorFlow) using google Colab and when trying to use it locally I got the error: Unknown Initializer: GlorotUniform.

That is where the similarities end. In the linked questions, the answers seem to add some imports when loading the model in the local system

However I cannot do that because I am using my trained h5 model in the STMCube.AI module (which is a module to load a h5 keras model and translate it into C code to be used by a STM microcontroller)

I suppose that I cannot modify how the script of Cube.AI loads the model (as the answers in the links suggest) so my question is: Is there a way to correct this when generating the model??

KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
  • This error happens when you save a model with tf.keras and you try to load it with keras, is that the case? Both libraries are not compatible in that way. – Dr. Snoopy Nov 23 '19 at 16:57
  • One of the sources I am learning from uses KEras. The other source uses tf.keras and they don't have a problem. The problems seems to be in a different version being used by Cube.AI – KansaiRobot Nov 24 '19 at 06:25
  • I don't think you answered my question: model saved with tf.keras and loaded with keras (or viceversa). – Dr. Snoopy Nov 24 '19 at 10:04

0 Answers0