Skip to content

Instantly share code, notes, and snippets.

@hietalajulius
Created June 2, 2024 06:36
Show Gist options
  • Save hietalajulius/39fab0a38b0ef132f81840051966c13c to your computer and use it in GitHub Desktop.
Save hietalajulius/39fab0a38b0ef132f81840051966c13c to your computer and use it in GitHub Desktop.
YOLO executorch export
from ultralytics import YOLO
import torch
def main():
model = YOLO("yolov8n.pt")
example_input = torch.ones((1, 3, 640, 640))
exported_program = torch.export.export(model, (example_input,))
print(exported_program)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment