Yuxin Wu 5/23/2022

TorchScript: Tracing vs. Scripting

Read Original

This technical article compares PyTorch's two methods for converting an nn.Module to TorchScript: tracing and scripting. It argues that tracing should be the default for deploying non-trivial models, citing its advantages for code quality and how its limitations can be mitigated by mixing with scripting. It clarifies terminology and discusses dynamic control flow.

TorchScript: Tracing vs. Scripting

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week