Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyTorch support #720

Closed
lutzroeder opened this issue Apr 11, 2021 · 0 comments
Closed

PyTorch support #720

lutzroeder opened this issue Apr 11, 2021 · 0 comments
Labels

Comments

@lutzroeder
Copy link
Owner

lutzroeder commented Apr 11, 2021

PyTorch and TorchScript support multiple serialization formats. Based on which format is used, a .pth or .pt file might contain only tensor data, a partial module hierarchy without graph connections or a TorchScript serialized graph.

  • torch.save(model.state_dict(), file) - the app will load the tensors, grouping names by modules
  • torch.save(model, file) - the app will show the module hierarchy without node connections
  • torch.jit.script(model).save(file) - the app will try to extract and render the TorchScript graph, see #842.
  • torch.utils.tensorboard.SummaryWriter - the app will open the graph from the events file, see #1024.
  • torch.export - the app loads and renders the exported .pt2 graph, see #1211

PyTorch support is experimental. The recommended approach is to save the model to ONNX.

pytorch/pytorch#31877 for discussion of PyTorch container formats.

Examples:
alexnet.pkl.pth.zip
alexnet.zip.pth.zip
densenet161.zip.pth.zip
inception_v3.pkl.pth.zip
inception_v3.zip.pth.zip
resnet101.pkl.pth.zip
r3d_18.zip.pth.zip
shufflenet_v2_x1_0.zip.pth.zip
squeezenet1_1.pkl.pth.zip
valid-bert-base-uncased.zip
ENet.pth.zip
pytorch_invalid_file.zip
tutorial_models.zip via pytorch-tutorial
labels.pth.zip
mnist_bfloat16.pt.zip
fruit_veg_model.pkl.zip
yolov5n.tensor.pth.zip
from_numpy.pth.zip
data.pkl.zip
yolov5n-0.5.pt.zip
torch_fx_sample.pt.zip
tensors.data.pkl.zip
densenet.data.pkl.zip
fast.ai.data.pkl.zip
yolov5n.tensor.data.pkl.zip
vicuna-7b.zip
bad-hands-5.pt.zip
tensors.pkl.zip
cup_wild_vit_l_1img.ckpt.zip
hrnet_posenet_FP32.pth.zip
InternVideo2-stage2_1b-224p-f4.pt.zip
cloudpickle.pth.zip

Tools:
pytorch_strip_weights.zip

lutzroeder added a commit that referenced this issue Oct 15, 2021
lutzroeder added a commit that referenced this issue Apr 25, 2022
lutzroeder added a commit that referenced this issue Apr 26, 2022
lutzroeder added a commit that referenced this issue Jul 14, 2022
lutzroeder added a commit that referenced this issue Aug 5, 2022
lutzroeder added a commit that referenced this issue Aug 26, 2022
lutzroeder added a commit that referenced this issue Sep 11, 2022
lutzroeder added a commit that referenced this issue Sep 11, 2022
lutzroeder added a commit that referenced this issue Sep 24, 2022
lutzroeder added a commit that referenced this issue Oct 16, 2022
lutzroeder added a commit that referenced this issue Dec 18, 2022
lutzroeder added a commit that referenced this issue Oct 13, 2023
lutzroeder added a commit that referenced this issue Oct 13, 2023
lutzroeder added a commit that referenced this issue Oct 21, 2023
lutzroeder added a commit that referenced this issue Oct 21, 2023
lutzroeder added a commit that referenced this issue Oct 22, 2023
lutzroeder added a commit that referenced this issue Oct 22, 2023
lutzroeder added a commit that referenced this issue Oct 22, 2023
lutzroeder added a commit that referenced this issue Jan 15, 2024
lutzroeder added a commit that referenced this issue Jan 15, 2024
lutzroeder added a commit that referenced this issue Jan 15, 2024
lutzroeder added a commit that referenced this issue Mar 3, 2024
lutzroeder added a commit that referenced this issue Mar 23, 2024
lutzroeder added a commit that referenced this issue Jun 9, 2024
lutzroeder added a commit that referenced this issue Jun 10, 2024
lutzroeder added a commit that referenced this issue Jun 19, 2024
lutzroeder added a commit that referenced this issue Nov 2, 2024
lutzroeder added a commit that referenced this issue Nov 2, 2024
lutzroeder added a commit that referenced this issue Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant