PyTorch · Function
F.linear
torch.nn.functional.linear computes a linear transformation from an input tensor, weight, and optional bias. It supports inputs with leading dimensions and can use either matrix or vector weights.
Last updated
Syntax
torch.nn.functional.linear(input, weight, bias=None) → TensorIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
torch.nn.functionaltorch.nn.Linear