vec

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

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) CumProd

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

func (*Op) CumSum

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

func (*Op) FFT

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

func (*Op) Linspace

func (op *Op) Linspace(start, stop float64, num int) ([]float64, error)

type Operator

type Operator interface {
	// Linspace splits space between start and stop linearly into num values
	Linspace(start, stop float64, num int) ([]float64, error)

	// CumSum obtains cumulative sum of input
	CumSum(input []float64) ([]float64, error)

	// CumProd obtains cumulative product of input
	CumProd(input []float64) ([]float64, error)

	// FFT obtains discrete fast fourier transform over input
	FFT(input []float64) ([]float64, error)
}

Operator defines several operations on float64 data type.

Jump to

Keyboard shortcuts

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