目录

Train

Training machine learning models often requires custom train loop and custom code. As such, we don’t provide an out of the box training loop app. We do however have examples for how you can construct your training app as well as generic components you can use to run your custom training app.

  1. Trainer Example

  2. Component Best Practices

  3. See torchx.components to learn more about authoring components

  4. For more information on distributed training see torchx.components.dist.

Embedded Train Script

For simple apps you can use the torchx.components.utils.python() component to embed the training script as a command line argument to the Python command. This has a size limitation but works for many smaller apps.

>>> from torchx.components.utils import python
>>> app = """
... import sys
... print(f"Hello, {sys.argv[0]}")
... """
>>> python("TorchX user", c=app)
AppDef(..., entrypoint='python', ...)

文档

访问 PyTorch 的全面开发人员文档

查看文档

教程

获取面向初学者和高级开发人员的深入教程

查看教程

资源

查找开发资源并解答您的问题

查看资源