qqwweee / keras-yolo3

A Keras implementation of YOLOv3 (Tensorflow backend)
MIT License
7.14k stars 3.45k forks source link

Does train.py script save model to 2 files, weights + json(for model arch)? #757

Open IanCheng18 opened 2 years ago

IanCheng18 commented 2 years ago

Does train.py script save the model in both h5 (weights) + json(for model arch)?

Since both json and h5 is needed to reload the Model (except using model.save() function where everything is saved to one h5 file) correct me if it's not right

But what I see in the train.py is that only the weight file is saved using: See at train.py line 68-85.

model.save_weights(log_dir + 'trained_weights_final.h5')

Why isn't the script using model.save() to save the whole model in one file? Or saving both h5 (weights) and json file?

And it is saving only the h5 (weights) in the script?

I am facing issues while want to use the saved weights to convert to FPGA using fastmachinelearning's hls4ml. Where I will need the json file, or the complete h5 file with model architecture included.