util

package
v0.0.0-...-25d19a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlmostEqualFloat64

func AlmostEqualFloat64(a, b, threshold float64) bool

func AlmostEqualFloat64Slices

func AlmostEqualFloat64Slices(a, b []float64, threshold float64) error

func ConstructBitset

func ConstructBitset(values []int) []uint32

ConstructBitset return a slice where bits in place of `values` are set

func FindInBitsetUint32

func FindInBitsetUint32(bits uint32, pos uint32) bool

func Float64FromBytes

func Float64FromBytes(bytes []byte, littleEndian bool) float64

Float64FromBytes converts 8 bytes to float

func MinInt

func MinInt(a, b int) int

func NumMismatchedFloat64Slices

func NumMismatchedFloat64Slices(a, b []float64, threshold float64) (int, error)

func ReadParamsUntilBlank

func ReadParamsUntilBlank(reader *bufio.Reader) (stringParams, error)

func Sigmoid

func Sigmoid(x float64) float64

Sigmoid applies sigmoid transformation to value

func SigmoidFloat64SliceInplace

func SigmoidFloat64SliceInplace(vec []float64)

SigmoidFloat64SliceInplace applies sigmoid transformation to each value in slice. Inplace

func SoftmaxFloat64Slice

func SoftmaxFloat64Slice(rawValues []float64, outputValues []float64, startIndex int)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL