Package org.deeplearning4j.nn.conf.graph
Class AttentionVertex.Builder
- java.lang.Object
-
- org.deeplearning4j.nn.conf.graph.AttentionVertex.Builder
-
- Enclosing class:
- AttentionVertex
public static class AttentionVertex.Builder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected WeightInit
weightInit
Weight initialization scheme
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttentionVertex
build()
AttentionVertex.Builder
headSize(long headSize)
Size of Attention HeadsAttentionVertex.Builder
nHeads(int nHeads)
Number of Attention HeadsAttentionVertex.Builder
nInKeys(long nInKeys)
Size of KeysAttentionVertex.Builder
nInQueries(long nInQueries)
Size of QueriesAttentionVertex.Builder
nInValues(long nInValues)
Size of ValuesAttentionVertex.Builder
nOut(long nOut)
Output SizeAttentionVertex.Builder
projectInput(boolean projectInput)
Toggle to enable / disable projection of inputs (key, values, queries).AttentionVertex.Builder
weightInit(WeightInit weightInit)
Weight initialization scheme
-
-
-
Field Detail
-
weightInit
protected WeightInit weightInit
Weight initialization scheme
-
-
Method Detail
-
nInKeys
public AttentionVertex.Builder nInKeys(long nInKeys)
Size of Keys
-
nInQueries
public AttentionVertex.Builder nInQueries(long nInQueries)
Size of Queries
-
nInValues
public AttentionVertex.Builder nInValues(long nInValues)
Size of Values
-
headSize
public AttentionVertex.Builder headSize(long headSize)
Size of Attention Heads
-
nHeads
public AttentionVertex.Builder nHeads(int nHeads)
Number of Attention Heads
-
nOut
public AttentionVertex.Builder nOut(long nOut)
Output Size
-
weightInit
public AttentionVertex.Builder weightInit(WeightInit weightInit)
Weight initialization scheme
-
projectInput
public AttentionVertex.Builder projectInput(boolean projectInput)
Toggle to enable / disable projection of inputs (key, values, queries). Works only if input size is identical for all AND only one head is used AND output size is identical to input size
-
build
public AttentionVertex build()
-
-