linear(x, weight, bias=None)¶
Applies a linear transformation to the incoming data: y = x * t(weight) + bias. The operation also supports batching of the weight matrices. This is useful if a batch of different network parameters are to be represented.
x (array) – The input x compute linear transformation on. [outer_batch_shape,inner_batch_shape,in_features]
weight (array) – The weight matrix. [outer_batch_shape,out_features,in_features]
bias (array, optional) – The bias vector, default is None. [outer_batch_shape,out_features]
Result array of the linear transformation. [outer_batch_shape,inner_batch_shape,out_features]