DefaultCPUAllocator: not enough memory: you tried to allocate 151519232 bytes. #5553
chenqili2020
started this conversation in
General
Replies: 1 comment
-
Hello. Did you try to reduce the batch size? I suggest you use --weights yolov5x.pt or higher due to your image size (YOLOv5n6?). Don't worry about the suggested img size parameter, it does not affect at all the object detection output. Try this instead: The training will take hours or even days if you are using a CPU, it's better to use a GPU. PD. Read this: https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was using this command to run the code
python3 train.py --img 1080 --batch 16 --epochs 5 --data myowndata.yaml --weights yolov5s.pt --nosave --cache
and this what was outputting before error
`Logging results to runs\train\exp17
Starting training for 5 epochs...
0%| | 0/4 [00:00<?, ?it/s]C
:\Users\YourDaddy\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\torch\autocast_mode.py:141: UserWarning: User provided device_type of 'cuda', but CUDA is no
t available. Disabling
warnings.warn('User provided device_type of 'cuda', but CUDA is not available. Disabling')
0%| `
what caused this issue? My pC has 28+216 Gb ram
I heard that this might be caused by the image size being too large, but I have too keep it large, since the object in the img are small ;-;
Beta Was this translation helpful? Give feedback.
All reactions