Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache []selfattention.Cache
Cache contains the self-attention cache for each head.
type Model ¶
Model contains the serializable parameters.
func (*Model) Forward ¶
Forward performs the forward step for each input node and returns the result.
func (*Model) Init ¶
func (m *Model) Init(rng *rand.LockedRand)
Init initializes the self-attention heads and the merge layer with uniform Xavier random distribution.
Click to show internal directories.
Click to hide internal directories.