Error using gpuArray in yolov4ObjectDetector/detect
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Walter Roberson
2022-7-16
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
2022-12-10
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.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!