Tianxiaomo / pytorch-YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4
Apache License 2.0
4.47k stars 1.49k forks source link

How do you continue training from darknet weights in pytorch? #409

Open hhristov94 opened 3 years ago

hhristov94 commented 3 years ago

I have a trained yolov4 darknet model and I want to continue training in pytorch. Can I do that?

Huxwell commented 3 years ago

Why not? You can save weights to .pth or .pt format. But afaik you still need to keep .cfg file around, since PyTorch doesn't support saving architecture (it stays in python code) alongside the weights.

You can also try .onnx format (saves both architecture and wieghts), but it changes the architecture while saving and is not human readable. I am not sure if contunuing training from it is easy.