java.lang.Object
me.damoebe.architectures.transformer.Block<H,N>
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungBlock(@NotNull MultiHeadAttention<H> multiHeadAttention, N multiLayerPerceptron) The main constructor of the Block class -
Methodenübersicht
-
Konstruktordetails
-
Block
public Block(@NotNull @NotNull MultiHeadAttention<H> multiHeadAttention, @NotNull N multiLayerPerceptron) The main constructor of the Block class- Parameter:
multiHeadAttention- A MultiHeadAttention object that will be cloned and used for this block.multiLayerPerceptron- A FFNetwork object that will be cloned and used as an MLP architecture.
-
-
Methodendetails
-
getOutputFor
Gets the output for the inserted input(s) by passing them through the mha module and mlp.- Parameter:
inputEmbeddings- A list of inputs: if the head type is EDHead: [0] is the decoder input and [1] is the encoder input. Else: [0] is the head input.- Gibt zurück:
- The output embeddings for this block.
-
clone
-