TensorPlay
API symbolsnn
Copy
View MarkdownDownload .md

tensorplay.nn.functional.linear

tensorplay.nn.functional.linear(input: TensorBase, weight: TensorBase, bias: TensorBase | None = None) TensorBase[source]

Applies a linear transformation to the incoming data: \(y = xA^T + b\).

Shape:
  • Input: \((*, H_\text{in})\) where \(*\) means any number of dimensions including none and \(H_\text{in} = \text{in\_features}\).

  • Weight: \((H_\text{out}, H_\text{in})\) where \(H_\text{out} = \text{out\_features}\).

  • Bias: \((H_\text{out})\)

  • Output: \((*, H_\text{out})\)

See Linear for more details.

Ask DeepWiki