hunglc007 / tensorflow-yolov4-tflite

YOLOv4, YOLOv4-tiny, YOLOv3, YOLOv3-tiny Implemented in Tensorflow 2.0, Android. Convert YOLO v4 .weights tensorflow, tensorrt and tflite
https://github.com/hunglc007/tensorflow-yolov4-tflite
MIT License
2.23k stars 1.24k forks source link

Saving model issue #332

Closed lr13953301387 closed 3 months ago

lr13953301387 commented 3 years ago

I suppose model.save_weights("./checkpoints/yolov4") is going generate a .pb file in my directory, but I can only find a .data-00000-of-00001 file, a .index file and a file called checkpoints. Anyone know what might go wrong?

RodolfoFerro commented 3 years ago

You may want to add model.save('./checkpoints/yolov4') after that line and it will create a new folder as follows:

└── yolov4
    ├── assets
    ├── saved_model.pb
    └── variables
        ├── variables.data-00000-of-00001
        └── variables.index
lr13953301387 commented 3 years ago

You may want to add model.save('./checkpoints/yolov4') after that line and it will create a new folder as follows:

└── yolov4
    ├── assets
    ├── saved_model.pb
    └── variables
        ├── variables.data-00000-of-00001
        └── variables.index

Thank you for your reply, this indeed solves the problem. However, I encounter another problem. I have trained my model for around 10 epochs and the loss has dropped into a relatively low value. Then I load my model and train it again, but the weights of my previous trained model seem like have not been loaded because the loss value is much higher. Do you have any idea what might cause it?

Thanks