Home > Software engineering >  How do I find my trained model trained by "kaggle.com"
How do I find my trained model trained by "kaggle.com"

Time:03-07

I trained a model use kaggle.com

The final code is:

history = model.fit(dataset, epochs=1)
model.save("/kaggle/working/039_model.h5")
print("Model saved successfully!")

The output is:

31368/31368 [==============================] - 23489s 749ms/step - loss: 1.4623
Model saved successfully!

For test, I just trained it for 1 epoch, but I cannot find my model in the /kaggle/working directory in the right side bar. Even if I click the refresh button or refresh the page.

The page picture is : my problem picture

Thanks for your help!

CodePudding user response:

The refresh button of browser refreshes the whole environment that you were working on, all variables that were set, any file that were saved in storage instance allotted to you for that particular session.

You are given an instance of a server resource, i.e., RAM, few GB of temporary storage, CPU/GPU for a certain period of time. Refreshing the browser starts completely new instance losing all local changes to that instance.

So your model even though it might be saved in the local storage of that instance (on server), it will get deleted once that session expires (after 20 minutes of inactivity) or when you run out of quota or when you refreshes your page.

Solution is to don't refresh your page, look where the model is saved by exploring in side bar by clicking dropdown button and downloading the model for future use case.

Side Note: Committing your notebook will only commit, i.e., save that particular version of your code in the notebook, and will not save anything that you saved to the local storage of that instance, like in your case a saved model file.

CodePudding user response:

Well, maybe I know what happend, I just find out I should save and run all.

File -> save version -> save & run all

so we can get all we want.

  • Related