Out of memory error
이전 댓글 표시
Hello guys, i am training network using 800 images with 5 classes... first i get this error after 3rd epoch and now after 7th epoch...
i am using this detector :
detector = yolov4ObjectDetector("csp-darknet53-coco",className,anchorBoxes,InputSize=inputSize);
Here are my training options:
options = trainingOptions("adam",...
GradientDecayFactor=0.9,...
SquaredGradientDecayFactor=0.999,...
InitialLearnRate=0.001,...
LearnRateSchedule="none",...
MiniBatchSize=1,...
L2Regularization=0.0005,...
MaxEpochs=10,...
BatchNormalizationStatistics="moving",...
DispatchInBackground=true,...
ResetInputNormalization=false,...
Shuffle="every-epoch",...
VerboseFrequency=20,...
ValidationFrequency=2000,...
CheckpointPath=tempdir,...
ValidationData=validationData);
and here is the error i keep getting ...
Error using matlab.io.datastore.TransformedDatastore/read
Invalid transform function defined on datastore.
Error in nnet.internal.cnn.DataLoader/manageReadQueue (line 206)
data = read(ds);
Error in nnet.internal.cnn.DataLoader/nextBatch (line 82)
manageReadQueue(this);
Error in deep.internal.data.DatastoreDispatcher/readNextMiniBatchIntoCache (line 149)
nextMiniBatchAndSize = nextBatch(this.Dataloader);
Error in deep.internal.data.DatastoreDispatcher/next (line 59)
readNextMiniBatchIntoCache(this);
Error in deep.internal.data.BackgroundDispatcher>iCallNextOnPoolConstant (line 538)
[miniBatch, nextMiniBatchSize] = constantObject.Value.next();
Caused by:
Out of memory.
답변 (1개)
Sourabh
2023년 5월 15일
0 개 추천
Hey Adrian,
There might be a few reasons why you might be facing an ‘out of memory’ error when training your model:
- The size of your images might be too large. I would recommend resizing your input images using the imresize function to reduce the amount of memory consumed.
- It is also possible that your computer hardware might not be able to run the imported model. You could consider using a smaller model such as ‘tiny-yolov4-coco'.
To monitor the amount of memory on your computer and the amount of memory being used by MATLAB, run the command memory.
You might find the following links helpful:
- https://www.mathworks.com/help/matlab/matlab_prog/resolving-out-of-memory-errors.html
- https://www.mathworks.com/help/matlab/performance-and-memory.html
- https://www.mathworks.com/help/matlab/matlab_env/set-workspace-and-variable-preferences.html
- https://www.mathworks.com/help/matlab/large-files-and-big-data.html
Hope this helps!
카테고리
도움말 센터 및 File Exchange에서 Parallel and Cloud에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!