ivy.neural_net_functional.layers.linear(x, weight, bias, f=None)[source]

Applies a linear transformation to the incoming data: y = x * t(weight) + bias, where t(…) indicates transpose.

  • x (array) – The input x compute linear transformation on. [N,,in_features]*

  • weight (array) – The weight matrix. [out_features,in_features]

  • bias (array) – The bias vector. [out_features]

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


Result array of the linear transformation. [N,∗,out_features]

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty