import torch
# Load your PyTorch model
model = torch.load('yolov5s.pt', weights_only=False )
model.eval() # Set the model to evaluation mode
Error:-
>>> %Run convertor.py
Traceback (most recent call last):
File "C:\Users\manojroy\Desktop\CircuitDigest\AssistiveTechForBlind\SIPEED_DEVELOPMENT_BOARD\nncase\ncc_win_x86_64\convertor.py", line 4, in <module>
model = torch.load('yolov5s.pt', weights_only=False )
File "C:\Users\manojroy\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 1097, in load
return _load(
File "C:\Users\manojroy\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 1525, in _load
result = unpickler.load()
File "C:\Users\manojroy\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 1515, in find_class
return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'models'
>>>
Can Anyone help me in solving this error.