flâneur — a map of the web's best reading

TorchScript: Tracing vs. Scripting - Yuxin's Blog

ppwwyyxx.com · 3,869 words · saved by 1 readers

PyTorch provides two methods to turn an nn.Module into a graph represented in TorchScript format: tracing and scripting. This article will: Compare their pros and cons, with a focus on useful tips fo

Posted 22/May/2022 TorchScript: Tracing vs. Scripting PyTorch provides two methods to turn an nn.Module into a graph represented in TorchScript format: tracing and scripting. This article will: Compare their pros and cons, with a focus on useful tips for tracing. Try to convince you that torch.jit.trace should be preferred over torch.jit.script for deployment of non-trivial models. The second point might be an uncommon opinion: If I Google "tracing vs scripting", the first article recommends scripting as default. But tracing has many advantages. In fact, by the time I left, "tracing as default

Explore this link on the map →

related reading