Klasse EDHead
java.lang.Object
me.damoebe.architectures.transformer.mha.Head
me.damoebe.architectures.transformer.mha.EDHead
-
Feldübersicht
Von Klasse geerbte Felder me.damoebe.architectures.transformer.mha.Head
biases, inputEmbeddingAmount, inputEmbeddingSize, masked, weights -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungEDHead(int inputEmbeddingAmount, int inputEmbeddingSize) The main constructor of the decoder Head Identical to the super constructor -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggenerateQKVMatrices(Sequence[] inputEmbeddings) Calculates the QKVMatrices based on the decoder and encoder input embeddings.Von Klasse geerbte Methoden me.damoebe.architectures.transformer.mha.Head
getInputEmbeddingAmount, getInputEmbeddingSize, getOutput, insertInput, multiplyMatrices, updateQKVWeights
-
Konstruktordetails
-
EDHead
public EDHead(int inputEmbeddingAmount, int inputEmbeddingSize) The main constructor of the decoder Head Identical to the super constructor- Parameter:
inputEmbeddingAmount- The amount of input embeddingsinputEmbeddingSize- The size of each input embedding
-
-
Methodendetails
-
generateQKVMatrices
Calculates the QKVMatrices based on the decoder and encoder input embeddings.- Setzt außer Kraft:
generateQKVMatricesin KlasseHead- Parameter:
inputEmbeddings- The input Embedding lists -> here it has to contain 2 embedding lists. [0] is the decoder input and [1] is the encoder input- Gibt zurück:
- The query, key and value matrices which will be used to calculate the attention.
- Löst aus:
Exception
-