Memory & GPU Optimization (yolov5/forkserver)

I’ve been experimenting with yolov5 to train models for use with Blue Iris / CodeProject.AI object detection. Most of my training was done on Google Colab but I’m not keen on it so I am now trying to run it locally on a Windows 10 PC with NVidia GPU using Docker and WSL2.

I’ve got it to work but I had a lot of problems with memory overflow and my GPU utilisation looks low (next to nothing).

Have you considered changing your code to use torch.multiprocessing.set_start_method(‘forkserver’) to see if that would help? I’m hoping that would solve my memory issues and allow me to increase the training batch size (and hopefully speed).

Ref: PyTorch - NCC @ Durham<

Cheers
Alan

(I have a computing background but am a total novice at off-host programming i.e. python, AI, pyTorch, etc, so implementing such a change is beyond me!).