Documentation
¶
Index ¶
- Constants
- func SelfEntropy(Q, K, V Matrix) []float64
- type Matrix
- func Add(m Matrix, n Matrix) Matrix
- func Entropy(m Matrix) Matrix
- func Everett(m Matrix) Matrix
- func H(m Matrix, n Matrix) Matrix
- func MulT(m Matrix, n Matrix) Matrix
- func Neg(m Matrix) Matrix
- func NewMatrix(states, cols, rows int) Matrix
- func NewRandMatrix(rnd *rand.Rand, states, cols, rows int) Matrix
- func Normalize(m Matrix) Matrix
- func Sigmoid(m Matrix) Matrix
- func Softmax(m Matrix) Matrix
- func Step(m Matrix) Matrix
- func Sub(m Matrix, n Matrix) Matrix
- func T(m Matrix) Matrix
Constants ¶
View Source
const ( // StateM is the state for the mean StateM = iota // StateV is the state for the variance StateV // StateTotal is the total number of states StateTotal )
View Source
const (
// S is the scaling factor for the softmax
S = 1.0 - 1e-300
)
Variables ¶
This section is empty.
Functions ¶
func SelfEntropy ¶
SelfEntropy computes the self entropy of Q, K, V
Types ¶
Click to show internal directories.
Click to hide internal directories.