You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm really stumped. I used autokeras to train a text classification model. The best model was saved off in best_model.keras, I can see in tuner.py where the save call is. But I cannot reload the models to use it. Believe me, I have tried a whole bunch of things the whole day and read through everything I can find, and I'm stuck. My training program looks like this.
At this point however, I notice a "best_model.keras" file is created automatically (and I can see the call in tuner.py) and this file is bigger than any file I save manually. I decide to use the best_model.keras files saved by autokeras.
All I want to do for the sake of testing is to load the model without errors. And I cannot, after trying as many permutations as I can find.
The chief complaint seems to be no vocabulary is passed in. I have tried various permutations of passing in custom_objects, for example loading autokeras and passing in custom_objects = ak.CUSTOM_OBJECTS and that doesn't work either.
autokeras/keras_nlp downloaded the Bert vocabulary file and I do have that file.
I cannot reload the model even in the same Python interactive session where autokeras just trained and saved the model.
So, I have potentially useful "best_model.keras" files that I cannot use, which is sad. I'm terribly stuck, and any feedback would be appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I'm really stumped. I used autokeras to train a text classification model. The best model was saved off in best_model.keras, I can see in tuner.py where the save call is. But I cannot reload the models to use it. Believe me, I have tried a whole bunch of things the whole day and read through everything I can find, and I'm stuck. My training program looks like this.
At this point however, I notice a "best_model.keras" file is created automatically (and I can see the call in tuner.py) and this file is bigger than any file I save manually. I decide to use the best_model.keras files saved by autokeras.
All I want to do for the sake of testing is to load the model without errors. And I cannot, after trying as many permutations as I can find.
The chief complaint seems to be no vocabulary is passed in. I have tried various permutations of passing in custom_objects, for example loading autokeras and passing in custom_objects = ak.CUSTOM_OBJECTS and that doesn't work either.
autokeras/keras_nlp downloaded the Bert vocabulary file and I do have that file.
I cannot reload the model even in the same Python interactive session where autokeras just trained and saved the model.
So, I have potentially useful "best_model.keras" files that I cannot use, which is sad. I'm terribly stuck, and any feedback would be appreciated.
Alan
Beta Was this translation helpful? Give feedback.
All reactions