public static class LearnedSelfAttentionLayer.Builder extends SameDiffLayer.Builder<LearnedSelfAttentionLayer.Builder>
paramWeightInit, weightInitbiasUpdater, regularization, regularizationBias, updaterallParamConstraints, biasConstraints, iDropout, layerName, weightConstraints| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
LearnedSelfAttentionLayer |
build() |
LearnedSelfAttentionLayer.Builder |
headSize(int headSize)
Size of attention heads
|
LearnedSelfAttentionLayer.Builder |
nHeads(int nHeads)
Number of Attention Heads
|
LearnedSelfAttentionLayer.Builder |
nIn(int nIn) |
LearnedSelfAttentionLayer.Builder |
nOut(int nOut) |
LearnedSelfAttentionLayer.Builder |
nQueries(int nQueries)
Number of queries to learn
|
LearnedSelfAttentionLayer.Builder |
projectInput(boolean projectInput)
Project input before applying attention or not.
|
weightInit, weightInitbiasUpdater, l1, l1Bias, l2, l2Bias, regularization, regularizationBias, updater, weightDecay, weightDecay, weightDecayBias, weightDecayBiasconstrainAllParameters, constrainBias, constrainWeights, dropOut, dropOut, namepublic LearnedSelfAttentionLayer.Builder nIn(int nIn)
nIn - Number of inputs to the layer (input size)public LearnedSelfAttentionLayer.Builder nOut(int nOut)
nOut - Number of outputs (output size)public LearnedSelfAttentionLayer.Builder nHeads(int nHeads)
public LearnedSelfAttentionLayer.Builder headSize(int headSize)
public LearnedSelfAttentionLayer.Builder projectInput(boolean projectInput)
public LearnedSelfAttentionLayer.Builder nQueries(int nQueries)
public LearnedSelfAttentionLayer build()
build in class Layer.Builder<LearnedSelfAttentionLayer.Builder>Copyright © 2021. All rights reserved.