Shortcuts

torch.nn.functional.bilinear

torch.nn.functional.bilinear(input1, input2, weight, bias=None)[source]

Applies a bilinear transformation to the incoming data: y=x1TAx2+by = x_1^T A x_2 + b

Shape:

  • input1: (N,,Hin1)(N, *, H_{in1}) where Hin1=in1_featuresH_{in1}=\text{in1\_features} and * means any number of additional dimensions. All but the last dimension of the inputs should be the same.

  • input2: (N,,Hin2)(N, *, H_{in2}) where Hin2=in2_featuresH_{in2}=\text{in2\_features}

  • weight: (out_features,in1_features,in2_features)(\text{out\_features}, \text{in1\_features}, \text{in2\_features})

  • bias: (out_features)(\text{out\_features})

  • output: (N,,Hout)(N, *, H_{out}) where Hout=out_featuresH_{out}=\text{out\_features} and all but the last dimension are the same shape as the input.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources