Shortcuts

torch.nn.functional.linear

torch.nn.functional.linear(input, weight, bias=None)[source]

Applies a linear transformation to the incoming data: y=xAT+by = xA^T + b.

This operator supports TensorFloat32.

Shape:

  • Input: (N,,in_features)(N, *, in\_features) N is the batch size, * means any number of additional dimensions

  • Weight: (out_features,in_features)(out\_features, in\_features)

  • Bias: (out_features)(out\_features)

  • Output: (N,,out_features)(N, *, out\_features)

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources