Yolov4-tiny train error on google colab

Hello,
So im trying to train a custom yolov4-tiny model with google colab.
At the point Makefile i get this Error Message:
Compilation terminated due to -Wfatal-errors.

Makefile:162: recipe for target "obj/convolutional layer.o“ failed

make:***[obj/convolutional layer.o] Error 1

What is the problem here?

I found something on Stack Overflow as to this issue. It seems you’ll need to update your Makefile to match the CUDA version running in Colab.

The first 3 cells of the YOLOv4-tiny notebook are where these updates will be made:

1 Like

I run these steps
But i will check my makefile monday thanks for the quick answer

No problem, and you’re welcome!

i changed my makefile but still the same error
an i share my colab with you? here is the full error

gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv -DGPU -I/usr/local/cuda-11.2/include/ -DCUDNN -DCUDNN_HALF -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/include/cudnn/include -DCUDNN_HALF -c ./src/convolutional_layer.c -o obj/convolutional_layer.o
./src/convolutional_layer.c: In function ‘cudnn_convolutional_setup’:
./src/convolutional_layer.c:288:24: error: ‘CUDNN_CONVOLUTION_FWD_PREFER_FASTEST’ undeclared (first use in this function); did you mean ‘CUDNN_CONVOLUTION_BWD_FILTER_ALGO_3’?
int forward_algo = CUDNN_CONVOLUTION_FWD_PREFER_FASTEST;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CUDNN_CONVOLUTION_BWD_FILTER_ALGO_3
compilation terminated due to -Wfatal-errors.
Makefile:162: recipe for target ‘obj/convolutional_layer.o’ failed
make: *** [obj/convolutional_layer.o] Error 1

Can you first check to see if there is a similar issue posted on the original YOLOv4-tiny repository?

We are not the original creators/maintainers of the code for YOLOv4-tiny, so it may be the case that it has already been resolved there.

Happy to take a look when we’re available if it has not yet been referenced or resolved there.

Hi sir. please help me with this error i really need to fix this for my thesis project /content/darknet
chmod +x *.sh
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/convolutional_layer.c -o obj/convolutional_layer.o
./src/convolutional_layer.c: In function ‘cudnn_convolutional_setup’:
./src/convolutional_layer.c:286:24: error: ‘CUDNN_CONVOLUTION_FWD_PREFER_FASTEST’ undeclared (first use in this function); did you mean ‘CUDNN_CONVOLUTION_BWD_FILTER_ALGO_3’?
286 | int forward_algo = CUDNN_CONVOLUTION_FWD_PREFER_FASTEST;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CUDNN_CONVOLUTION_BWD_FILTER_ALGO_3
compilation terminated due to -Wfatal-errors.
make: *** [Makefile:162: obj/convolutional_layer.o] Error 1

I’ll see if we can take a deeper look. Have you found anything in the Issues on the original YOLOv4-tiny repo?

Here’s our forked repo: GitHub - roboflow/darknet: YOLOv4 (v3/v2) - Windows and Linux version of Darknet Neural Networks for object detection (Tensor Cores are used)

Also tagging @SkalskiP in case he has any ideas.

I also do want to add, it’ll be best to now add issues with notebooks directly to the notebooks repo for better tracking: GitHub - roboflow/notebooks: Set of Jupyter Notebooks linked to Roboflow blog posts and used in our YouTube videos.