Skip to content

Commit

Permalink
Fix getting started code snippet (#8637)
Browse files Browse the repository at this point in the history
Fix quotes in getting started code snippets
  • Loading branch information
GregoryComer committed Feb 23, 2025
1 parent be7d8e3 commit ace450d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docs/source/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ import executorch
model = MyModel() # The PyTorch model to export
example_inputs = (torch.randn(1,3,64,64),) # A tuple of inputs

et_program =
executorch.exir.to_edge_transform_and_lower(
torch.export.export(model, example_inputs)
partitioner=[XnnpackPartitioner()]
et_program = executorch.exir.to_edge_transform_and_lower(
torch.export.export(model, example_inputs),
partitioner=[XnnpackPartitioner()]
).to_executorch()

with open(model.pte”, “wb”) as f:
with open("model.pte", "wb") as f:
f.write(et_program.buffer)
```

Expand Down Expand Up @@ -121,7 +120,7 @@ import org.pytorch.executorch.Tensor;

//

Module model = Module.load(/path/to/model.pte);
Module model = Module.load("/path/to/model.pte");

Tensor input_tensor = Tensor.fromBlob(float_data, new long[] { 1, 3, height, width });
EValue input_evalue = EValue.from(input_tensor);
Expand Down

0 comments on commit ace450d

Please sign in to comment.