YOLOV11 -Training gibt Fackel.outofMemoryErrorPython

Python-Programme
Anonymous
 YOLOV11 -Training gibt Fackel.outofMemoryError

Post by Anonymous »

Ich versuche, ein Yolov11 -Modell für eine Reihe von Bildern zu trainieren, aber ich stoße in ein Problem. Die GPU Das Modell trainiert ein Geforce RTX 4070 Super.

Code: Select all

print(torch.__version__)
2.5.1+cu121
< /code>
Ich habe das Modell einige Male geschult, ohne Probleme mit diesem Befehl zu treffen: < /p>
yolo task=detect mode=train device=0 epochs=2000 batch=32 data="C:\Project\Yolo\data_custom.yaml" model="C:\Project\Yolo\yolov11m.pt" imgsz=640
< /code>
, aber das gab mir keine Ergebnisse, die gut genug sind. Wenn ich also das maßgebliche Wert von "IMGSZ" auf 1440 erhöht (meine Bilder sind 2560 bis 1440), sollte das Modell mit Bildern von Reifenqualität trainieren. Also habe ich versucht, diesen Befehl auszuführen: < /p>
yolo task=detect mode=train device=0 epochs=2000 batch=32 data="C:\Project\Yolo\data_custom.yaml" model="C:\Project\Yolo\yolov11m.pt" imgsz=640
< /code>
Ausführen dieses Befehls gibt mir einen Fehler, von dem ich nicht weiß, wie ich es lösen soll. Der Fehler lautet wie folgt: < /p>
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 1.48 GiB. GPU 0 has a total capacity of 11.99 GiB of which 0 bytes is free. Of the allocated memory 19.12 GiB is allocated by PyTorch, and 406.58 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
Hat jemand, wie dieses Problem gelöst wird?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post