Documentation ¶
Index ¶
- Constants
- func Determinant(a Matrix) (float32, error)
- func InBetween(i, min, max int) bool
- type Mat
- func (m Mat) Columns() int
- func (m Mat) Det() (float64, error)
- func (m Mat) ExcludeColumn(column int) (Mat, error)
- func (m Mat) ExcludeRow(row int) (Mat, error)
- func (m Mat) IsMatrix() bool
- func (m Mat) IsSquare() bool
- func (m Mat) Print()
- func (m Mat) Rows() int
- func (m Mat) SubMatrix(column_start int, column_end int, row_start int, row_end int) (Mat, error)
- type Matrix
- func Add(m Matrix, n Matrix) Matrix
- func EverettActivation(m Matrix) Matrix
- func MulT(m Matrix, n Matrix) Matrix
- func NewMatrix(states, cols, rows int) Matrix
- func Normalize(m Matrix) Matrix
- func SelfAttention(Q, K, V Matrix) Matrix
- func SelfEntropy(Q, K, V Matrix) ([]Matrix, []float32)
- func Sigmoid(m Matrix) Matrix
- func Step(m Matrix) Matrix
- func Sub(m Matrix, n Matrix) Matrix
- func T(m Matrix) Matrix
- func TaylorSoftmax(m Matrix) Matrix
- type Multi
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 Determinant ¶
Types ¶
type Matrix ¶
Matrix is a float32 matrix
func EverettActivation ¶
EverettActivation is the everett complex activation function
func SelfAttention ¶
SelfAttention computes the self attention of Q, K, V
func SelfEntropy ¶
SelfEntropy computes the self entropy of Q, K, V
func TaylorSoftmax ¶
TaylorSoftmax is the taylor softmax https://arxiv.org/abs/1511.05042
Click to show internal directories.
Click to hide internal directories.