java.lang.Object
me.damoebe.architectures.transformer.Block<H,N>
-
Constructor Summary
ConstructorsConstructorDescriptionBlock(@NotNull MultiHeadAttention<H> multiHeadAttention, N multiLayerPerceptron) The main constructor of the Block class -
Method Summary
-
Constructor Details
-
Block
public Block(@NotNull @NotNull MultiHeadAttention<H> multiHeadAttention, @NotNull N multiLayerPerceptron) The main constructor of the Block class- Parameters:
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.
-
-
Method Details
-
getOutputFor
Gets the output for the inserted input(s) by passing them through the mha module and mlp.- Parameters:
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.- Returns:
- The output embeddings for this block.
-
clone
-