How to save the model file in yolov3 project.
I just write one line: model.save("./yolov3") in for epoch in range(cfg.TRAIN.EPOCHS): for image_data, target in trainset: train_step(image_data, target, epoch) for image_data, target in valset: validate_step(image_data, target, epoch) model.save_weights("./yolov3") model.save("./yolov3")
without any sess.run saver.save?
In Tensorflow 2.0, you can simply save whole model like keras API by using
model.save('mymodel.h5').
For example;
`
Create and train a new model instance.
model = create_model() model.fit(train_images, train_labels, epochs=5)
Save the entire model to a HDF5 file.
The '.h5' extension indicates that the model shuold be saved to HDF5.
model.save('my_model.h5')
Recreate the exact same model, including its weights and the optimizer
new_model = tf.keras.models.load_model('my_model.h5')
Show the model architecture
new_model.summary() `
Check Tensorlfow 2.o tutorial for details: https://www.tensorflow.org/tutorials/keras/save_and_load
in this code i can not save .h5 only save ckpt why?