requires_grad
)backward()
).grad
)torch.nn
torch.nn.Module
Base Classtorch.nn
losses)torch.optim
)torch.utils.data.Dataset
torchvision.transforms
)torch.utils.data.DataLoader
Was this section helpful?
torch.tensor
, PyTorch Developers, 2023 (PyTorch Foundation) - Provides detailed API documentation for creating tensors from Python lists and NumPy arrays, including argument specifics and type inference.torch.zeros()
, torch.ones()
, torch.rand()
, torch.randn()
, and _like
variants for initializing tensors with specific shapes and values.