Applies a bilinear transformation to the incoming data: y=x1TAx2+b.
Parameters:
in1_features (int) – size of each first input sample, must be > 0
in2_features (int) – size of each second input sample, must be > 0
out_features (int) – size of each output sample, must be > 0
bias (bool) – If set to False, the layer will not learn an additive bias.
Default: True
Shape:
Input1: (∗,Hin1) where Hin1=in1_features and
∗ means any number of additional dimensions including none. All but the last dimension
of the inputs should be the same.
Input2: (∗,Hin2) where Hin2=in2_features.
Output: (∗,Hout) where Hout=out_features
and all but the last dimension are the same shape as the input.
Variables:
weight (torch.Tensor) – the learnable weights of the module of shape
(out_features,in1_features,in2_features).
The values are initialized from U(−k,k), where
k=in1_features1
bias – the learnable bias of the module of shape (out_features).
If bias is True, the values are initialized from
U(−k,k), where