aryan vats
aryan vats

Reputation: 1

attributeError when loading yolov5s from torch hub

I am trying to build a driver drowsiness detection model. I wanted to load in the yolov5s ultralytics implementation using torch hub but I am getting an error. The code I wrote: model=torch.hub.load('ultralytics/yolov5','yolov5s') I have already loaded in ultralytics, torch,torchvision, numpy. I am getting an attributeerror like so: AttributeError Traceback (most recent call last) Input In [39], in <cell line: 1>() ----> 1 model = torch.hub.load('ultralytics/yolov5', 'yolov5s')

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\hub.py:566, in load(repo_or_dir, model, source, trust_repo, force_reload, verbose, skip_validation, *args, **kwargs) 562 if source == 'github': 563 repo_or_dir = _get_cache_or_reload(repo_or_dir, force_reload, trust_repo, "load", 564 verbose=verbose, skip_validation=skip_validation) --> 566 model = _load_local(repo_or_dir, model, *args, **kwargs) 567 return model . . . AttributeError: module 'numpy' has no attribute '_no_nep50_warning' How do I fix ths?

I tried reinstalling the latest versions of torch and numpy but the error did not change.

Upvotes: 0

Views: 85

Answers (0)

Related Questions