AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.63k stars 7.95k forks source link

CUDA Error: out of memory #5683

Open KosukeHao opened 4 years ago

KosukeHao commented 4 years ago

Firstly, thanks for your work!'

When I train yolov4 with my customized data in Linux,

"./darknet detector train build/darknet/x64/data/obj.data cfg/yolo-obj.cfg build/darknet/x64/yolov4.conv.137"

with batch=32, subdivisions=16 , and W\H are all 768, it was ok, but logs shows too quickly.

But, when I tried to train with multi-gpus by command:

./darknet detector train build/darknet/x64/data/obj.data cfg/yolo-obj.cfg build/darknet/x64/yolov4.conv.137 -gpus 0, 1

CUDA Error: out of memory OCCURed.

could anyone tell me the relationship between "batch size" and the "batch" here?

AlexeyAB commented 4 years ago

batch=32 mini-batch = batch / subdivisions = 2

feixiangdekaka commented 4 years ago

when settin: batch=32 subdivisions = 16 mini-batch = batch / subdivisions = 2

1 iterations = 2 or 32 images?

AlexeyAB commented 4 years ago

32