目录

torchtune.utils

Miscellaneous

batch_to_device

Function that takes a dictionary (or nested dictionary) of tensors and sets them all to the same device.

get_device

Function that takes an optional device string, verifies it's correct and available given the machine and distributed settings, and returns a device().

get_logger

Get a logger with a stream handler.

torch_version_ge

Check if torch version is greater than or equal to the given version.

文档

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

查看文档

教程

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

查看教程

资源

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

查看资源