When i load a model with YOLOv5 and specify 'cpu'
, yolo is still using 'gpu'
. Why?
The code:
model = yolov5.load(model, device='cuda' if torch.cuda.is_available() else 'cpu')
print('cuda' if torch.cuda.is_available() else 'cpu')
prints cpu
It is always writing the following message into the console which is quite annoying:
UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling
warnings.warn('User provided device_type of \'cuda\', but CUDA is not available. Disabling')