public static final class ScaledDotProductAttentionBlock.Builder
extends java.lang.Object
ScaledDotProductAttentionBlock
s.Modifier and Type | Method and Description |
---|---|
ScaledDotProductAttentionBlock |
build()
Creates a new
ScaledDotProductAttentionBlock with the current configuration. |
ScaledDotProductAttentionBlock.Builder |
optAttentionProbsDropoutProb(float attentionProbsDropoutProb)
Sets the probability of applying dropout to the attention probability distribution.
|
ScaledDotProductAttentionBlock.Builder |
setEmbeddingSize(int embeddingSize)
Sets the embedding Size to be used for the internal token representation.
|
ScaledDotProductAttentionBlock.Builder |
setHeadCount(int headCount)
Sets the number of attention Heads, must divide the embedding size without rest.
|
public ScaledDotProductAttentionBlock.Builder setEmbeddingSize(int embeddingSize)
embeddingSize
- the embedding Size to be used for the internal token representation.public ScaledDotProductAttentionBlock.Builder setHeadCount(int headCount)
headCount
- the number of attention Headspublic ScaledDotProductAttentionBlock.Builder optAttentionProbsDropoutProb(float attentionProbsDropoutProb)
attentionProbsDropoutProb
- the probability of applying dropout to the attention
probability distributionpublic ScaledDotProductAttentionBlock build()
ScaledDotProductAttentionBlock
with the current configuration.ScaledDotProductAttentionBlock
with the current configuration.