From 96cd3895ff44cd740fd4e088306df0a191089db5 Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:16:48 +0800 Subject: [PATCH] Add warning about Windows multi-processing error when launching training (#18547) Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Co-authored-by: UltralyticsAssistant Co-authored-by: Glenn Jocher --- docs/en/modes/train.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/modes/train.md b/docs/en/modes/train.md index 276bd4f6..a1649f8a 100644 --- a/docs/en/modes/train.md +++ b/docs/en/modes/train.md @@ -49,6 +49,10 @@ The following are some notable features of YOLO11's Train mode: Train YOLO11n on the COCO8 dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) at image size 640. The training device can be specified using the `device` argument. If no argument is passed GPU `device=0` will be used if available, otherwise `device='cpu'` will be used. See Arguments section below for a full list of training arguments. +!!! warning "Windows Multi-Processing Error" + + On Windows, you may receive a `RuntimeError` when launching the training as a script. Add a `if __name__ == "__main__":` block before your training code to resolve it. + !!! example "Single-GPU and CPU Training Example" Device is determined automatically. If a GPU is available then it will be used, otherwise training will start on CPU.