PyTorch 文档 ¶
PyTorch 是一个用于深度学习的优化张量库,支持使用 GPU 和 CPU。
本文档中描述的功能根据发布状态进行分类:
稳定版:这些功能将长期维护,通常不会有重大性能限制或文档中的空白。我们还期望保持向后兼容性(尽管可能会发生破坏性更改,并且将在一个版本之前通知)。
测试版:这些功能被标记为测试版,因为 API 可能会根据用户反馈而更改,因为性能需要改进,或者因为操作符的覆盖范围尚未完成。对于测试版功能,我们致力于将该功能推进到稳定版分类。然而,我们并不承诺向后兼容性。
原型:这些功能通常不作为二进制发行版(如 PyPI 或 Conda)的一部分提供,有时可能通过运行时标志提供,处于早期阶段以供反馈和测试。
开发者笔记
语言绑定
Python API
- torch
- torch.nn
- torch.nn.functional
- torch.Tensor
- 张量属性
- 张量视图
- torch.amp
- torch.autograd
- torch.library
- torch.accelerator
- torch.cpu
- torch.cuda
- 理解 CUDA 内存使用
- 生成快照
- 使用可视化工具
- 快照 API 参考
- torch.mps
- torch.xpu
- torch.mtia
- torch.mtia.memory
- 元设备
- torch.backends
- torch.export
- torch.distributed
- torch.distributed.tensor
- torch.distributed.algorithms.join
- torch.distributed.elastic
- torch.distributed.fsdp
- torch.distributed.fsdp.fully_shard
- torch.distributed.tensor.parallel
- torch.distributed.optim
- torch.distributed.pipelining
- torch.distributed.checkpoint
- torch.distributions
- torch.compiler
- torch.fft
- torch.func
- torch.futures
- torch.fx
- torch.fx.experimental
- torch.hub
- torch.jit
- torch.linalg
- torch.monitor
- torch.signal
- torch.special
- torch.overrides
- torch.package
- torch.profiler
- torch.nn.init
- torch.nn.attention
- torch.onnx
- torch.optim
- 复数
- DDP 通信钩子
- 量化
- 分布式 RPC 框架
- torch.random
- torch.masked
- torch.nested
- torch.Size
- torch.sparse
- torch.Storage
- torch.testing
- torch.utils
- torch.utils.benchmark
- torch.utils.bottleneck
- torch.utils.checkpoint
- torch.utils.cpp_extension
- torch.utils.data
- torch.utils.deterministic
- torch.utils.jit
- torch.utils.dlpack
- torch.utils.mobile_optimizer
- torch.utils.model_zoo
- torch.utils.tensorboard
- torch.utils.module_tracker
- 类型信息
- 命名张量
- 命名张量操作覆盖率
- torch.__config__
- torch.__future__
- torch._logging
- 火炬环境变量