DeepTrackAI / DeepTrack2

DeepTrack2
MIT License
162 stars 50 forks source link

Saving & loading models #158

Closed seanbyrne226 closed 1 year ago

seanbyrne226 commented 1 year ago

Hi there,

I am trying to save my trained model using the standard keras procedure e.g model.save ('my_model') / reconstructed_model = keras.models.load_model("my_model") However, this causes the following error when WARNING:absl:Found untraced functions such as _jit_compiled_convolution_op, _jit_compiled_convolution_op

I am wondering what is the correct procedure to save and load deeptrack models?

BenjaminMidtvedt commented 1 year ago

If you only want to do inference (no further training), you can safely ignore the warnings. Alternatively, you can try saving the models as hdf5 files instead.

If you want to keep training the network, you can either swap to load_weights or, again, save as hdf5.

Let me know if this works for you!

seanbyrne226 commented 1 year ago

It works thanks :)