INNER CODE UNIT · Go

DotProductPooled

takara-ai/go-attention · attention/attention.go:65

func DotProductPooled(v1, v2 Vector) (float64, error) {
	return DotProduct(v1, v2)
}

// Deprecated: Use DotProduct instead.
func DotProductParallel(v1, v2 Vector, config interface{}) (float64, error) {
	return DotProduct(v1, v2)
}

// Deprecated: Use DotProduct instead.
func DotProductOptimized(v1, v2 Vector) (float64, error) {
	return DotProduct(v1, v2)
}

// Softmax applies the softmax function to a vector
// Performance: O(n) where n=len(x)
func Softmax(x Vector) Vector {
	if len(x) == 0 {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…