math

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: MIT Imports: 4 Imported by: 0

README

op/stats

this is a simple go wrapper on TensorFlow linear algebra functions.

installation

install Go API for TensorFlow https://www.tensorflow.org/install/lang_go

$ go get github.com/sdeoras/comp/...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Op

type Op struct {
	// It embeds common op
	common.Op
}

Op is the operator for TF interface.

func NewOperator

func NewOperator(options *tf.SessionOptions) (*Op, error)

NewOperator provides an instance of new operator for interfacing with TF.

func (*Op) Max

func (op *Op) Max(input []float64) (float64, error)

func (*Op) Mean

func (op *Op) Mean(input []float64) (float64, error)

func (*Op) Min

func (op *Op) Min(input []float64) (float64, error)

func (*Op) Prod

func (op *Op) Prod(input []float64) (float64, error)

func (*Op) Std

func (op *Op) Std(input []float64) (float64, error)

func (*Op) Sum

func (op *Op) Sum(input []float64) (float64, error)

type Operator

type Operator interface {
	Min(x []float64) (float64, error)
	Max(x []float64) (float64, error)
	Mean(x []float64) (float64, error)
	Std(x []float64) (float64, error)
	Sum(x []float64) (float64, error)
	Prod(x []float64) (float64, error)
}

Operator defines several stats operations on float64 slice.

Jump to

Keyboard shortcuts

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