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!