Rate this Page

torch.nn.functional.linear#

torch.nn.functional.linear(input, weight, bias=None) Tensor#

Applies a linear transformation to the incoming data: y=xAT+b.

This operation supports 2-D weight with sparse layout

Warning

Sparse support is a beta feature and some layout(s)/dtype/device combinations may not be supported, or may not have autograd support. If you notice missing functionality please open a feature request.

This operator supports TensorFloat32.

Shape:

  • Input: (,in_features) where * means any number of additional dimensions, including none

  • Weight: (out_features,in_features) or (in_features)

  • Bias: (out_features) or ()

  • Output: (,out_features) or (), based on the shape of the weight

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.