Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Inference using load_state_dict #181

Open
Karthik-U-94 opened this issue Aug 5, 2020 · 1 comment
Open

Inference using load_state_dict #181

Karthik-U-94 opened this issue Aug 5, 2020 · 1 comment

Comments

@Karthik-U-94
Copy link

I have created Model using torch.save(retinanet.state_dict(), 'model_final.pt') Now I have changed

from retinanet import model

    ##########################

    retinanetModel = model.resnet101(num_classes=3,)
    retinanetModel.load_state_dict(torch.load(model_path), strict=False)

    if torch.cuda.is_available():
        retinanetModel = retinanetModel.cuda()

    retinanetModel.training = False
    retinanetModel.eval()

    ##########################
    
    scores, classification, transformed_anchors = retinanetModel(image.cuda().float())

No objects are Detecting.
Please help me out

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants