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 WeightInitweightInitWeight initialization scheme
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttentionVertexbuild()AttentionVertex.BuilderheadSize(long headSize)Size of Attention HeadsAttentionVertex.BuildernHeads(int nHeads)Number of Attention HeadsAttentionVertex.BuildernInKeys(long nInKeys)Size of KeysAttentionVertex.BuildernInQueries(long nInQueries)Size of QueriesAttentionVertex.BuildernInValues(long nInValues)Size of ValuesAttentionVertex.BuildernOut(long nOut)Output SizeAttentionVertex.BuilderprojectInput(boolean projectInput)Toggle to enable / disable projection of inputs (key, values, queries).AttentionVertex.BuilderweightInit(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()
-
-