功能描述
Applies a bilinear transformation to the incoming data: math:`y = x_1^T A x_2 + b`
Shape:
Input1: (N, *, Hin1) where Hin1 = in1_features and * means any number of additional dimensions. All but the last dimension of the inputs should be the same.
Input2: (N, *, Hin2) where Hin2 = in2_features.
Output: (N, *, Hout) where Hout = out_features and all but the last dimension are the same shape as the input.
该函数主要的作用是对于输入的数据进行双线性的变换,它有两个输入,并且对于输入、输出的最后一个维度应该和nn.Bilinear(in1_features,in2_features,out_features)是相同的。在该函数中bias服从均匀分布
examples:
# 导入所需要的包
import torch
import torch.nn as nn
# 对于输入数据进行双线性变换 math:`y = x_1^T A x_2 + b`
# ['in1_features', 'in2_features', 'out_features']
m=nn.Bilin