Error using gpuArray in yolov4Obje​ctDetector​/detect

1 view (last 30 days)
i am trying train yolov4ObjectDetector, then i follow in this link https://www.mathworks.com/help/vision/ug/object-detection-using-yolov4-deep-learning.html. There is an error on line 117 about "detect" function.
Error using dlnetwork/predict
Layer 'mish_2': Invalid input data. Error using 'predict' in layer nnet.cnn.layer.FunctionLayer. The function threw an error and could not be
executed.
Error in yolov4ObjectDetector>iPredictActivations (line 1153)
[features{:}] = predict(network, dlX, 'Acceleration',acceleration);
Error in yolov4ObjectDetector/predict (line 515)
features = iPredictActivations(network, imgBatch, anchorBoxes, predictParams.Acceleration);
Error in vision.internal.detector.ObjectDetector/performDetect (line 72)
features = this.predict(Ipreprocessed, params);
Error in yolov4ObjectDetector/detect (line 402)
[varargout{1:nargout}] = performDetect(detector, I, params);
Error in cobaan (line 117)
detectionResults = detect(detector,testData);
Caused by:
Error using gpuArray/max
Out of memory on device. To view more detail about available memory on the GPU, use 'gpuDevice()'. If the problem persists, reset the GPU by
calling 'gpuDevice(1)'.
Error in dlarray/max (line 96)
zdata = max(matlab.lang.internal.move(xdata), matlab.lang.internal.move(ydata), varargin{:});
Error in vision.cnn.mish (line 22)
Z1 = max(X,0) + log(1 + exp(-abs(X)));
Error in nnet.cnn.layer.FunctionLayer/predict (line 58)
[varargout{1:layer.NumOutputs}] = feval(layer.PredictFcn, varargin{:});
I've tried changing the mini batch size value but the error shows the same. Any solution?
  4 Comments
Walter Roberson
Walter Roberson on 16 Jul 2022
https://github.com/ultralytics/yolov3/issues/1155 contains a report from someone who found that minibatch size of 2 with yolov4 was too much for their 2080. There are some suggestions there, but it is not clear to me that those suggestions are relevant to MATLAB.
yikes_pd
yikes_pd on 10 Dec 2022
Hi Anisa and Walter. Mine got the same problem, however i am using GPU 3080Ti 12GB and only runs on 1 minibatch. Is it considered too low too? The problem occur after training, which is during evaluation.

Sign in to comment.

Answers (1)

Kursat CEVIK
Kursat CEVIK on 19 Oct 2022
I'm having this problem, is there a solution?

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!