You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for reaching out and for your thorough search before posting your question! Currently, val.py in YOLOv5 does not support multi-GPU validation directly through the --device parameter. The multi-GPU functionality is primarily designed for training purposes using train.py.
However, you can achieve multi-GPU validation by modifying the code to use torch.nn.DataParallel or torch.nn.parallel.DistributedDataParallel. Here’s a brief guide on how you might approach this:
Clone the YOLOv5 repository and install dependencies:
git clone https://github.com/ultralytics/yolov5
cd yolov5
pip install -r requirements.txt
For more detailed instructions and advanced configurations, you can refer to our Multi-GPU Training Guide.
If you encounter any issues or have further questions, please provide a minimum reproducible example of your code and the specific error messages you are seeing. This will help us to better understand and address your issue. You can find more information on creating a minimum reproducible example here.
Lastly, please ensure you are using the latest versions of torch and the YOLOv5 repository to avoid any compatibility issues.
Search before asking
Question
Hello,
Is there any way to use multi-gpu during running val.py of Yolov5?
I set --device parameter as 0,1,2,3, but it doesn't work
Additional
No response
The text was updated successfully, but these errors were encountered: