Bilinear
neuralpy.layers.linear.Bilinear(n_nodes, n1_features=None, n2_features=None, bias=True, name=None)
info
Bilinear Layer is mostly stable and can be used for any project. In the future, any chance of breaking changes is very low.
Bilinear layer performs a bilinear transformation of the input.
To learn more about Bilinear layers, please check pytorch documentation for it.
Supported Arguments
n_nodes
: (Integer) Size of the output samplen1_features=None
: (Integer) Size of the input sample 1, no need for this argument layers except the initial layern2_features=None
: (Integer) Size of the input sample 2, no need for this argument layers except the initial layerbias=True
: (Boolean) If true then uses the biasname=None
: (String) Name of the layer, if not provided then automatically calculates a unique name for the layer
Example Code
from neuralpy.models import Sequential
from neuralpy.layers.linear import Bilinear
# Making the model
model = Sequential()
model.add(Bilinear(n_nodes=256, n1_features=30, n2_features=40, bias=True, name="Input Layer"))