Skip to content

Instantly share code, notes, and snippets.

@take-cheeze
Created December 21, 2022 05:12
Show Gist options
  • Save take-cheeze/0d0bb1040d2236b5fef2aa446528eb71 to your computer and use it in GitHub Desktop.
Save take-cheeze/0d0bb1040d2236b5fef2aa446528eb71 to your computer and use it in GitHub Desktop.
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