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

TorchScript support #842

Open
5 tasks
lutzroeder opened this issue Nov 14, 2021 · 0 comments
Open
5 tasks

TorchScript support #842

lutzroeder opened this issue Nov 14, 2021 · 0 comments
Labels

Comments

@lutzroeder
Copy link
Owner

lutzroeder commented Nov 14, 2021

import torch
model = torch.nn.Transformer(nhead=16, num_encoder_layers=12)
src = torch.rand(10, 32, 512)
tgt = torch.rand(20, 32, 512)
trace = torch.jit.trace(model, (src, tgt))
trace.save('transformer_traced.pt')

Examples:
alexnet.pt.zip
alexnet_traced.pt.zip
bert-base-uncased.pt.zip
blitz_cifar10_tutorial.zip
blitz_neural_networks_tutorial.zip
deeplabv3_scripted.ptl.zip
densenet161.pt.zip
densenet161_traced.pt.zip
fasterrcnn_resnet50_fpn.pt.zip
fasterrcnn_resnet50_fpn.pt.zip
gpt2.pt.zip
inception_v3.pt.zip
inception_v3_traced.pt.zip
iv3_pertensor.zip
lite_real_sr.ptl.zip
LMModel1.zip
m4-sWE-0.1B.script.pt.zip
mask_depthwise_conv.pt.zip
mask_model.pt.zip
mask_rcnn.pt.zip
mnist_linear_torchscript.zip
mobilefacenet.pth.zip
mobilenet_v2.pt.zip
mobilenet_v2_traced.pt.zip
model_dynamic_cpu.pt.zip
model_static_cpu.pt.zip
module_000007.pt.zip
pedestrian_interaction_position_embedding.pt.zip
pedestrian_interaction_single_lstm.pt.zip
pyg_model.pt.zip
r3d_18.pt.zip
r3d_18_traced.pt.zip
rcnn.pt.zip
refine_model.pt.zip
resnet101.pt.zip
resnet101_traced.pt.zip
resnet18_quantized_cifar10.pt.zip
resnet50_pertensor.zip
resnext50_32x4d_fpn.pth.zip
rpn_model.pt.zip
shufflenet_v2_x1_0.pt.zip
shufflenet_v2_x1_0_traced.pt.zip
squeezenet1_1.pt.zip
squeezenet1_1_traced.pt.zip
ssdlite320_mobilenet_v3_large.pt.zip
stable_diffusion.zip
test.8bit.pth.zip
torchscript_resnet50_fp32.pth.zip
traced_fft.zip
traced_gpt2.pt.zip
transformer.pt.zip
transformer_traced.pt.zip
v1_lj_8000.jit.zip
wav2mel.pt.zip
yolo4_tiny.pt.zip
yolox_m.torchscript.pt.zip

Tools:
torch_jit_debug.py.zip
torch_jit_schemas.py.zip

Tasks:

  • prim::Loop
  • prim::GetAttr
  • _jit_pass_inline
  • Implicit inputs
  • Nested graphs
lutzroeder added a commit that referenced this issue Nov 14, 2021
lutzroeder added a commit that referenced this issue Nov 27, 2021
lutzroeder added a commit that referenced this issue Dec 9, 2021
lutzroeder added a commit that referenced this issue Dec 13, 2021
lutzroeder added a commit that referenced this issue Dec 16, 2021
lutzroeder added a commit that referenced this issue Feb 3, 2022
lutzroeder added a commit that referenced this issue Jun 26, 2022
lutzroeder added a commit that referenced this issue Jul 4, 2022
lutzroeder added a commit that referenced this issue Jul 9, 2022
lutzroeder added a commit that referenced this issue Sep 14, 2022
lutzroeder added a commit that referenced this issue Dec 10, 2022
lutzroeder added a commit that referenced this issue Dec 22, 2022
lutzroeder added a commit that referenced this issue Jan 9, 2023
lutzroeder added a commit that referenced this issue Jan 9, 2023
lutzroeder added a commit that referenced this issue May 28, 2023
lutzroeder added a commit that referenced this issue Jul 11, 2023
lutzroeder added a commit that referenced this issue Jul 23, 2023
lutzroeder added a commit that referenced this issue Apr 19, 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