And here is the code where i tested my network.
while(True):
    if not paused:
        model.eval()
        screen = np.array(ImageGrab.grab(bbox=(0,40,800,640)))
        #print("loop took {} seconds".format(time.time()-last_time))
        last_time = time.time()
        screen = cv2.cvtColor(screen, cv2.COLOR_BGR2GRAY)
        screen = cv2.resize(screen, (100,100))
        screen_tensor = torch.Tensor(screen).view(-1,100,100)
        final_screen = screen_tensor.view(-1,1,100,100)
        
        for param in model.parameters():
            param.requires_grad = False
        predictions = model(final_screen)
        print(predictions)
        _, pred = torch.max(predictions, 1)
        print(pred)
        pred = np.int(pred)
        #print(pred)
        
        if pred == 0:
            left()
            
        if pred == 1:
            straight()
        
        if pred == 2:
            breaks()
        
        if pred == 3:
            right()
            
    
    keys = key_check()
    
    if 'T' in keys:
        if paused:
            paused = False
            time.sleep(1)
        else:
            paused = True
            ReleaseKey(A)
            ReleaseKey(S)
            ReleaseKey(D)
            ReleaseKey(W)
            time.sleep(1)

please help me figure out what is should do for it to work properly