Blog

Deep Learning – How to train the model in GPU instead of CPU in YOLOv3, Darknet

deeplearning-yolov3-darknet
Machine Learning / Uncategorized

Deep Learning – How to train the model in GPU instead of CPU in YOLOv3, Darknet

Darknet is an open source neural network framework written in C and CUDA. can easily install and configure, and this can supports CPU and GPU computation

During the YOLOv3 deep learning setup and when training and make prediction, although it is going to be lot slower if you use CPU only. So Instead of that can use the GPU to get fast prediction in the deep learning model.

So have to make sure that your nvidia-smi command is working fine and proceed to the next level,

$ sudo nvidia-smi 

then, open your darknet “Makefile” and check the configuration looks like below, If you didn’t set the NVCC in your $PATH can set and export the direct location of NVCC bin file,
GPU=1
CUDNN=1
OPENCV=0
CC=gcc
CPP=g++
NVCC=nvcc

Build the darknet,

$ sudo make

Choose the number of GPUs based on which are available in your machine, I have 2 GPUs in my machine. Execute the below command,

$sudo ./darknet detector train model.data yolov3.cfg darknet53.conv.74 -gpus 0,1

For Reference: https://pjreddie.com/darknet/

Spread the love

Leave your thought here

Your email address will not be published. Required fields are marked *