趋近智
requires_grad
)backward()
).grad
)torch.nn
搭建模型torch.nn.Module
基类torch.nn
损失)torch.optim
)torch.utils.data.Dataset
torchvision.transforms
)torch.utils.data.DataLoader
这部分内容有帮助吗?
torch.tensor
, PyTorch Developers, 2023 (PyTorch Foundation) - 提供从Python列表和NumPy数组创建张量的详细API文档,包括参数细节和类型推断。torch.zeros()
、torch.ones()
、torch.rand()
、torch.randn()
等函数,以及用于根据特定形状和值初始化张量的_like
变体。