markub3327/HAR-Transformer

model-best

Closed this issue · 5 comments

I am very interested in your paper.
How to save your own model weights through training? model.load_weights("./save/model-best.h5")
looking forward to your reply.

Hi @Ma-PC,

the model is by default stored in the WanDB Project. If you want to do it manually please add a line after model.fit():
model.save_weights("./save/model-best.h5") for H5 format or model.save_weights("./save/model-best") for TF format.

If you want only the best model weights, add the flag: restore_best_weights=False to the EarlyStopping() callback.

Thanks.

thank you for your reply。
I found weight.h5 from running. Is this the best model to automatically save?
1
2

Yes, @Ma-PC . The screenshot depicts the best model file created by WandbCallback() on maximal validation accuracy.

Thanks.

@Ma-PC,

It's all from your side. Can I help you with any further questions? Can I close this issue?

Thanks.

I've closed the issue, I managed to run the code successfully using my own dataset. Thank you for your prompt responses, I appreciate it.