https://github.com/kernelinterrupt/pytorch_dart_example_models
https://github.com/kernelinterrupt/pytorch_dart_example_models
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/kernelinterrupt/pytorch_dart_example_models
- Owner: KernelInterrupt
- Created: 2024-07-14T13:43:49.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-14T13:54:02.000Z (over 1 year ago)
- Last Synced: 2024-07-14T15:36:05.101Z (over 1 year ago)
- Size: 40.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
The models of examples of Pytorch_Dart will be stored here.
Also,you can generate the model by yourself.
Run code below to generate `traced_resnet_model.pt`
```python
import torch
import torchvision
# An instance of your model.
model = torchvision.models.resnet18(pretrained=True)
# Switch the model to eval model
model.eval()
# An example input you would normally provide to your model's forward() method.
example = torch.rand(1, 3, 224, 224)
# Use torch.jit.trace to generate a torch.jit.ScriptModule via tracing.
traced_script_module = torch.jit.trace(model, example)
# Save the TorchScript model
traced_script_module.save("traced_resnet_model.pt")