megengine.functional.nn.linear# linear(inp, weight, bias=None, compute_mode='default')[源代码]# 对输入张量进行线性变换。 更多信息参见 Linear。 参数: inp (Tensor) – 形状为 (N, in_features) 的输入张量。 weight (Tensor) – 形状为 (out_features, in_features) 的权重张量。 bias (Optional[Tensor]) – 形状为 (out_features,) 的偏置张量。默认:None 返回类型: Tensor