Hi. I am trying to load a model with:
import torch

import pyautogui as mouse
import cv2 


from ScreenRecorder import Record,IniRecord,Frame


def start(model):
    sc_ini = Frame()
    monitor = sc_ini.get()
    sc = IniRecord(monitor,1.6)
    while True:
        frame = sc.getFrame()
        cv2.imshow('frame',frame)
        output_xy,output_click = model.forward(frame)
        #print(output_xy,output_click)
        if cv2.waitKey(1) & 0xFF == ord('q'):
            print("break")            
            break
        

model = torch.load_state_dict(torch.load('Model/model_save'))

But it says

  File "D:/Nextcloud/Python/Gamebot/Bot.py", line 31, in <module>
    model = torch.load_state_dict(torch.load('Model/model_save'))

AttributeError: module 'torch' has no attribute 'load_state_dict'