Created
December 21, 2022 05:12
-
-
Save take-cheeze/0d0bb1040d2236b5fef2aa446528eb71 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torchvision.models.detection import maskrcnn_resnet50_fpn, MaskRCNN_ResNet50_FPN_Weights | |
weights = MaskRCNN_ResNet50_FPN_Weights.DEFAULT | |
transforms = weights.transforms() | |
model = maskrcnn_resnet50_fpn(weights=weights, progress=False) | |
# model = model.eval() | |
model = model.train() | |
compiled = torch.compile(model) | |
# print(model) | |
# print(compiled) | |
print(compiled.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment