I have this script
import ultralytics
from ultralytics import YOLO
import torch
torch.cuda.is_available()
ultralytics.checks()
if __name__ == "__main__":
# Load a model
model = YOLO('yolov8n.pt') # load a pretrained model (recommended for training)
# Train the model
model.train(data='data.yaml', epochs=2, imgsz=832, device=0)
# Load our custom goat model
model = YOLO("runs/detect/train/weights/best.pt")
for this I am having the NVIDIA-SMI as
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 511.69 Driver Version: 511.69 CUDA Version: 11.6 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... WDDM | 00000000:01:00.0 Off | N/A |
| N/A 47C P8 3W / N/A | 0MiB / 4096MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
I ran the following 2 codes before running the script above
conda create -n ENV_NAME python=3.7
conda activate ENV_NAME
pip install ultralytics
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
conda install cudatoolkit
but when I am running this code I am getting the following error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\aftab\.conda\envs\pytorch_env\lib\multiprocessing\spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "C:\Users\aftab\.conda\envs\pytorch_env\lib\multiprocessing\spawn.py", line 126, in _main
self = reduction.pickle.load(from_parent)
MemoryError
raise err
OSError: [WinError 1455] The paging file is too small for this operation to complete. Error loading "C:\Users\aftab\.conda\envs\pytorch_env\lib\site-packages\torch\lib\cudnn_adv_infer64_8.dll" or one of its dependencies.
I have also tried to increase the memory in Advanced settings of PC till 8092 MB. What else can I do is it possible to debug this error as I want to run the YOLOV8 model on my local machine