How I can convert model.pt to model.h5?
After using YOLOv5 to train model weights as .pt file,
how can I convert the weights file (model.pt) to hdf5 file (model.h5)?
Running python train.py --batch 16 --epochs 3 --data mydata.yaml --weights yolov5s.pt, the result is given by best.pt file at subfolder of YOLOv5, how can I convert it to h5 file?

Do this installation and get started here
This could be a lengthy procedure ...    as you are aware that .pt only contains weights and not model architecture hence your model class should also be present in  your conversion code
Edit: New links are added
