The model seems to download and load properly, the below lines of code seems to work properly,
Nvidia-ProAI
def get_model(num_classes):
    """
    downloads the model and returns the model with the specified output classes
    Args:
        num_classes: number of output classes

    Returns:
        Returns the model with the linear layer of classes = num_classes
    """
    # load an object detection model pre-trained on COCO
    model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)
    in_features = model.roi_heads.box_predictor.cls_score.in_features
    # replace the pre-trained head with a new on
    model.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes)

    return model


def load_saved_model():
    """ Loads model 
        Check config file the parameters
    """
    data = yaml_loader()
    model = get_model(data['Model']['num_classes'])  # Using Saved model
    model.load_state_dict(torch.load(data['Model']['path']))
    model.eval()  # put the model in evaluation mode
    return model


# Using Saved model
model = load_saved_model()

The problem seems to occur only while passing the “video frame” to the model for object detection as shown below,
def score_frame(frame, model,device):
    """
    The function below identifies the device which 
    is availabe to make the prediction and uses it 
    to load and infer the frame. 
    Once it has results it will extract the labels and 
    cordinates(Along with scores) for each object detected 
    in the frame.
    
    Args:
        frame: Image frame
        model: object detection model
    Returns:
        labels: label of the image
        cords: coordinates of the bounding boxes
    """
    # Model to device
    model.to(device)
    # Passing frame inside model
    results = model([frame])             # Error 

    return results


# Score the Frame
    results = score_frame(frame, model, device=device)   # Error

I hope my question is clear. Please let me know if further information is required. Thank you in advance.