PyTorch · Class
TensorDataset
torch.nn is a set of neural-network building blocks. Together with optimizers, datasets, and data loaders, it helps define models, update their weights, and feed them batches.
Last updated
Syntax
class MyModel(nn.Module):
def __init__(self):
super().__init__()In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
torch.nntorch.nn.Moduletorch.nn.functionaltorch.optimParameterDatasetTensorDatasetDataLoader