Versions in this module Expand all Collapse all v0 v0.9.19 Jul 14, 2022 v0.9.18 Jul 14, 2022 Changes in this version + const CUDA + const DEBUG + var Bool = tensor.Bool + var Byte = tensor.Uint8 + var Float32 = tensor.Float32 + var Float64 = tensor.Float64 + var Int = tensor.Int + var Int32 = tensor.Int32 + var Int64 = tensor.Int64 + var Ptr = tensor.UnsafePointer + func BatchNorm(x, scale, bias *Node, momentum, epsilon float64) (retVal, γ, β *Node, op *BatchNormOp, err error) + func Binomial32(trials, prob float64, s ...int) []float32 + func Binomial64(trials, prob float64, s ...int) []float64 + func Broadcast(a, b *Node, pattern BroadcastPattern) (*Node, *Node, error) + func CheckOne(in Input) error + func Compile(g *ExprGraph) (prog *program, locMap map[*Node]register, err error) + func CompileFunction(g *ExprGraph, inputs, outputs Nodes) (prog *program, locMap map[*Node]register, err error) + func DebugDerives() + func DimSizersToShapes(ds []DimSizer) ([]tensor.Shape, error) + func DontDebugDerives() + func Err(e error) gErr + func FmtNodeMap(m interface{}) mapFmt + func Gaussian32(mean, stdev float64, s ...int) []float32 + func Gaussian64(mean, stdev float64, s ...int) []float64 + func GlorotEtAlN32(gain float64, s ...int) []float32 + func GlorotEtAlN64(gain float64, s ...int) []float64 + func GlorotEtAlU32(gain float64, s ...int) []float32 + func GlorotEtAlU64(gain float64, s ...int) []float64 + func GraphCollisionStats() (int, int, int) + func HeEtAlN64(gain float64, s ...int) []float64 + func HeEtAlU64(gain float64, s ...int) []float64 + func Let(n *Node, be interface{}) error + func Lift1(fn func(a *Node) (*Node, error)) func(a Input) Result + func Lift1Axial(fn func(a *Node, axes ...int) (*Node, error)) func(a Input, axes ...int) Result + func Lift2(fn func(a, b *Node) (*Node, error)) func(a, b Input) Result + func Lift2Broadcast(fn func(a, b *Node, pat1, pat2 []byte) (*Node, error)) func(a, b Input, pat1, pat2 []byte) Result + func NewLispMachine(g *ExprGraph, opts ...VMOpt) *lispMachine + func NewTapeMachine(g *ExprGraph, opts ...VMOpt) *tapeMachine + func ReturnNode(n *Node) + func ReturnType(t hm.Type) + func S(start int, opt ...int) tensor.Slice + func SetDerivOf(deriv, of *Node) + func SetOptimizationLevel(i int) + func TransformResult(ins ...Input) func(a Input, err error) Result + func TypeOf(v Value) hm.Type + func Uniform32(low, high float64, s ...int) []float32 + func Uniform64(low, high float64, s ...int) []float64 + func UnsafeLet(n *Node, be interface{}) error + func Use(b BLAS) + func UseNonStable() + func UseStabilization() + func ValueClose(a, b Value) bool + func ValueEq(a, b Value) bool + func WalkGraph(start *Node) <-chan *Node + func WithGraphName(name string) graphconopt + type ADOp interface + DoDiff func(ctx ExecutionContext, inputs Nodes, output *Node) error + type AdaGradSolver struct + func NewAdaGradSolver(opts ...SolverOpt) *AdaGradSolver + func (s *AdaGradSolver) Step(model []ValueGrad) (err error) + type AdamSolver struct + func NewAdamSolver(opts ...SolverOpt) *AdamSolver + func (s *AdamSolver) Step(model []ValueGrad) (err error) + type AdamW struct + func NewAdamW(opts ...SolverOpt) *AdamW + func (a *AdamW) Step(model []ValueGrad) (err error) + type Arena interface + Get func(dev Device, size int64) (tensor.Memory, error) + GetFromValue func(dev Device, v Value) (tensor.Memory, error) + Put func(dev Device, mem tensor.Memory, size int64) + PutValue func(dev Device, v Value) + Transfer func(toDev, fromDev Device, v Value, synchronous bool) (retVal Value, err error) + type AutoDiffError struct + func (err AutoDiffError) Error() string + type B bool + func NewB(v bool) *B + func (v *B) Data() interface{} + func (v *B) Dtype() tensor.Dtype + func (v *B) Format(s fmt.State, c rune) + func (v *B) MemSize() uintptr + func (v *B) Pointer() unsafe.Pointer + func (v *B) Shape() tensor.Shape + func (v *B) Size() int + func (v *B) Uintptr() uintptr + type BLAS interface + func WhichBLAS() BLAS + type BarzilaiBorweinSolver struct + func NewBarzilaiBorweinSolver(opts ...SolverOpt) *BarzilaiBorweinSolver + func (s *BarzilaiBorweinSolver) Step(model []ValueGrad) (err error) + type BatchNormOp struct + func (op *BatchNormOp) Arity() int + func (op *BatchNormOp) CallsExtern() bool + func (op *BatchNormOp) DiffWRT(inputs int) []bool + func (op *BatchNormOp) Do(values ...Value) (retVal Value, err error) + func (op *BatchNormOp) DoDiff(ctx ExecutionContext, inputs Nodes, output *Node) error + func (op *BatchNormOp) Hashcode() uint32 + func (op *BatchNormOp) InferShape(ns ...DimSizer) (tensor.Shape, error) + func (op *BatchNormOp) OverwritesInput() int + func (op *BatchNormOp) Reset() error + func (op *BatchNormOp) ReturnsPtr() bool + func (op *BatchNormOp) SetStats(runningMean tensor.Tensor, runningVariance tensor.Tensor) error + func (op *BatchNormOp) SetTraining(isTraining bool) error + func (op *BatchNormOp) Stats() (runningMean tensor.Tensor, runningVariance tensor.Tensor) + func (op *BatchNormOp) String() string + func (op *BatchNormOp) SymDiff(inputs Nodes, output *Node, grad *Node) (retVal Nodes, err error) + func (op *BatchNormOp) Type() hm.Type + func (op *BatchNormOp) UsePreallocDo(prealloc Value, inputs ...Value) (retVal Value, err error) + func (op *BatchNormOp) WriteHash(h hash.Hash) + type Batched interface + DoWork func() + WorkAvailable func() <-chan struct{} + type BatchedBLAS interface + type BatchedDevice interface + Errors func() error + Retval func() interface{} + type BinaryOp interface + IsBinary func() bool + type BroadcastPattern byte + func NewBroadcastPattern(leftAxes, rightAxes []byte) BroadcastPattern + type CLDoer interface + CLDo func(inputs ...Value) (Value, error) + type CUDAADOp interface + CUDADoDiff func(extern External, dev Device, inputs Nodes, output *Node) error + type CUDADoer interface + CUDADo func(extern External, dev Device, prealloc Value, inputs ...Value) (retVal Value, err error) + type CloneErrorer interface + Clone func() (interface{}, error) + type Cloner interface + Clone func() interface{} + type CopierFrom interface + CopyFrom func(src interface{}) error + type CopierTo interface + CopyTo func(dest interface{}) error + type Device int + const CPU + func (d Device) Alloc(extern External, size int64) (tensor.Memory, error) + func (d Device) Free(extern External, mem tensor.Memory, sie uint) error + func (d Device) IsGPU() bool + func (d Device) String() string + type DimSizer interface + DimSize func(int) (int, error) + func ShapesToDimSizers(shapes []tensor.Shape) []DimSizer + type Dtyper interface + Dtype func() tensor.Dtype + type Errer interface + Err func() error + type ExecutionContext struct + type ExprGraph struct + func NewGraph(opts ...graphconopt) *ExprGraph + func (g *ExprGraph) AddNode(n *Node) (retVal *Node) + func (g *ExprGraph) AllNodes() Nodes + func (g *ExprGraph) ByName(name string) (retVal Nodes) + func (g *ExprGraph) Clone() interface{} + func (g *ExprGraph) Constant(v Value) *Node + func (g *ExprGraph) Edge(u, v int64) graph.Edge + func (g *ExprGraph) Edges() graph.Edges + func (g *ExprGraph) ExactSubgraphRoots(ns ...*Node) *ExprGraph + func (g *ExprGraph) From(nodeid int64) graph.Nodes + func (g *ExprGraph) Has(nodeid int64) bool + func (g *ExprGraph) HasEdgeBetween(x, y int64) bool + func (g *ExprGraph) HasEdgeFromTo(u, v int64) bool + func (g *ExprGraph) Inputs() (retVal Nodes) + func (g *ExprGraph) Node(id int64) graph.Node + func (g *ExprGraph) Nodes() graph.Nodes + func (g *ExprGraph) RemoveNode(node graph.Node) + func (g *ExprGraph) Roots() (retVal Nodes) + func (g *ExprGraph) SetEdge(e graph.Edge) + func (g *ExprGraph) String() string + func (g *ExprGraph) Subgraph(ns ...*Node) *ExprGraph + func (g *ExprGraph) SubgraphRoots(ns ...*Node) *ExprGraph + func (g *ExprGraph) To(nid int64) graph.Nodes + func (g *ExprGraph) ToDot() string + func (g *ExprGraph) UnbindAll() + func (g *ExprGraph) UnbindAllNonInputs() + type ExternMetadata struct + func (m *ExternMetadata) Cleanup() + func (m *ExternMetadata) DoWork() error + func (m *ExternMetadata) Get(dev Device, size int64) (tensor.Memory, error) + func (m *ExternMetadata) GetFromValue(dev Device, v Value) (tensor.Memory, error) + func (m *ExternMetadata) Put(dev Device, mem tensor.Memory, size int64) + func (m *ExternMetadata) PutValue(dev Device, v Value) + func (m *ExternMetadata) Reset() + func (m *ExternMetadata) Signal() + func (m *ExternMetadata) Sync() chan struct{} + func (m *ExternMetadata) Transfer(toDev, fromDev Device, v Value, synchronous bool) (retVal Value, err error) + func (m *ExternMetadata) WorkAvailable() <-chan bool + func (m ExternMetadata) HasFunc(name string) bool + type External interface + Signal func() + Sync func() chan struct{} + type ExternalOp struct + Incr Value + Prealloc Value + UseUnsafe bool + func NewAddOp(a, b *Node, ctx ExecutionContext) *ExternalOp + func NewExternalOp(op Op, ctx ExecutionContext, prealloc Value) *ExternalOp + func NewHadamardProdOp(a, b *Node, ctx ExecutionContext) *ExternalOp + func NewSubOp(a, b *Node, ctx ExecutionContext) *ExternalOp + func (op *ExternalOp) DetermineDevice(inputs Nodes, output *Node) error + func (op *ExternalOp) Do(vals ...Value) (Value, error) + func (op *ExternalOp) String() string + type F32 float32 + func NewF32(v float32) *F32 + func (v *F32) Data() interface{} + func (v *F32) Dtype() tensor.Dtype + func (v *F32) Format(s fmt.State, c rune) + func (v *F32) MemSize() uintptr + func (v *F32) Pointer() unsafe.Pointer + func (v *F32) Shape() tensor.Shape + func (v *F32) Size() int + func (v *F32) Uintptr() uintptr + type F64 float64 + func NewF64(v float64) *F64 + func (v *F64) Data() interface{} + func (v *F64) Dtype() tensor.Dtype + func (v *F64) Format(s fmt.State, c rune) + func (v *F64) MemSize() uintptr + func (v *F64) Pointer() unsafe.Pointer + func (v *F64) Shape() tensor.Shape + func (v *F64) Size() int + func (v *F64) Uintptr() uintptr + type GroupNormOp struct + func (op *GroupNormOp) Arity() int + func (op *GroupNormOp) CallsExtern() bool + func (op *GroupNormOp) DiffWRT(inputs int) []bool + func (op *GroupNormOp) Do(inputs ...Value) (Value, error) + func (op *GroupNormOp) DoDiff(ctx ExecutionContext, inputs Nodes, output *Node) error + func (op *GroupNormOp) Hashcode() uint32 + func (op *GroupNormOp) InferShape(inputs ...DimSizer) (tensor.Shape, error) + func (op *GroupNormOp) OverwritesInput() int + func (op *GroupNormOp) ReturnsPtr() bool + func (op *GroupNormOp) String() string + func (op *GroupNormOp) SymDiff(inputs Nodes, output, grad *Node) (Nodes, error) + func (op *GroupNormOp) Type() hm.Type + func (op *GroupNormOp) UsePreallocDo(prealloc Value, inputs ...Value) (Value, error) + func (op *GroupNormOp) WriteHash(h hash.Hash) + type I int + func NewI(v int) *I + func (v *I) Data() interface{} + func (v *I) Dtype() tensor.Dtype + func (v *I) Format(s fmt.State, c rune) + func (v *I) MemSize() uintptr + func (v *I) Pointer() unsafe.Pointer + func (v *I) Shape() tensor.Shape + func (v *I) Size() int + func (v *I) Uintptr() uintptr + type I32 int32 + func NewI32(v int32) *I32 + func (v *I32) Data() interface{} + func (v *I32) Dtype() tensor.Dtype + func (v *I32) Format(s fmt.State, c rune) + func (v *I32) MemSize() uintptr + func (v *I32) Pointer() unsafe.Pointer + func (v *I32) Shape() tensor.Shape + func (v *I32) Size() int + func (v *I32) Uintptr() uintptr + type I64 int64 + func NewI64(v int64) *I64 + func (v *I64) Data() interface{} + func (v *I64) Dtype() tensor.Dtype + func (v *I64) Format(s fmt.State, c rune) + func (v *I64) MemSize() uintptr + func (v *I64) Pointer() unsafe.Pointer + func (v *I64) Shape() tensor.Shape + func (v *I64) Size() int + func (v *I64) Uintptr() uintptr + type IncrDoer interface + IncrDo func(toIncr Value, inputs ...Value) error + type InitWFn func(dt tensor.Dtype, s ...int) interface + func Gaussian(mean, stdev float64) InitWFn + func GlorotN(gain float64) InitWFn + func GlorotU(gain float64) InitWFn + func HeN(gain float64) InitWFn + func HeU(gain float64) InitWFn + func Ones() InitWFn + func RangedFrom(start int) InitWFn + func RangedFromWithStep(start, increment interface{}) InitWFn + func Uniform(low, high float64) InitWFn + func ValuesOf(val interface{}) InitWFn + func Zeroes() InitWFn + type Input interface + Node func() *Node + Nodes func() Nodes + type Iop struct + func (i Iop) Arity() int + func (i Iop) CallsExtern() bool + func (i Iop) Do(vs ...Value) (Value, error) + func (i Iop) Hashcode() uint32 + func (i Iop) InferShape(ds ...DimSizer) (tensor.Shape, error) + func (i Iop) OverwritesInput() int + func (i Iop) ReturnsPtr() bool + func (i Iop) String() string + func (i Iop) Type() hm.Type + func (i Iop) WriteHash(h hash.Hash) + type Mker interface + Mk func(...Input) Input + type Momentum struct + func NewMomentum(opts ...SolverOpt) *Momentum + func (s *Momentum) Step(model []ValueGrad) (err error) + type Namer interface + Name func() string + type NoOpError interface + NoOp func() bool + type NoRetOp interface + ReturnsNothing func() bool + type Node struct + func Abs(a *Node) (*Node, error) + func Add(a, b *Node) (*Node, error) + func ApplyOp(op Op, children ...*Node) (retVal *Node, err error) + func ApplyOpWithName(op Op, name string, children ...*Node) (retVal *Node, err error) + func At(a *Node, coords ...int) (retVal *Node, err error) + func Auto(op func(a, b *Node, leftPattern, rightPattern []byte) (*Node, error), ...) (*Node, error) + func AveragePool1D(x *Node, kernel, pad, stride int) (*Node, error) + func AveragePool2D(x *Node, kernel tensor.Shape, pad, stride []int) (*Node, error) + func BatchedMatMul(a, b *Node, transes ...bool) (retVal *Node, err error) + func BinaryXent(output, target *Node) (retVal *Node, err error) + func BinomialRandomNode(g *ExprGraph, dt tensor.Dtype, trials, prob float64, shape ...int) *Node + func BroadcastAdd(a, b *Node, leftPattern, rightPattern []byte) (*Node, error) + func BroadcastEq(a, b *Node, retSame bool, leftPattern, rightPattern []byte) (*Node, error) + func BroadcastGt(a, b *Node, retSame bool, leftPattern, rightPattern []byte) (*Node, error) + func BroadcastGte(a, b *Node, retSame bool, leftPattern, rightPattern []byte) (*Node, error) + func BroadcastHadamardDiv(a, b *Node, leftPattern, rightPattern []byte) (*Node, error) + func BroadcastHadamardProd(a, b *Node, leftPattern, rightPattern []byte) (*Node, error) + func BroadcastLt(a, b *Node, retSame bool, leftPattern, rightPattern []byte) (*Node, error) + func BroadcastLte(a, b *Node, retSame bool, leftPattern, rightPattern []byte) (*Node, error) + func BroadcastNe(a, b *Node, retSame bool, leftPattern, rightPattern []byte) (*Node, error) + func BroadcastPow(a, b *Node, leftPattern, rightPattern []byte) (*Node, error) + func BroadcastSub(a, b *Node, leftPattern, rightPattern []byte) (*Node, error) + func ByIndices(x *Node, indices *Node, axis int) (*Node, error) + func CTCLoss(logProbs, targets, inputLengths, targetLengths *Node, reduction Reduction) (*Node, error) + func Ceil(a *Node) (*Node, error) + func Concat(axis int, ns ...*Node) (retVal *Node, err error) + func Conv1d(in, filter *Node, kernel, pad, stride, dilation int) (*Node, error) + func Conv2d(im, filter *Node, kernelShape tensor.Shape, pad, stride, dilation []int) (retVal *Node, err error) + func ConvType(x *Node, from, to tensor.Dtype) (*Node, error) + func Cos(a *Node) (*Node, error) + func Cube(a *Node) (*Node, error) + func DiagFlat(a *Node) (*Node, error) + func Div(a, b *Node) (retVal *Node, err error) + func Dropout(x *Node, dropProb float64) (retVal *Node, err error) + func Eq(a, b *Node, retSame bool) (*Node, error) + func Exp(a *Node) (*Node, error) + func Expm1(a *Node) (*Node, error) + func Floor(a *Node) (*Node, error) + func GaussianRandomNode(g *ExprGraph, dt tensor.Dtype, mean, stdev float64, shape ...int) *Node + func GlobalAveragePool2D(x *Node) (*Node, error) + func GroupNorm(x, scale, bias *Node, numGroups, numChannels int, epsilon float64) (*Node, error) + func Gt(a, b *Node, retSame bool) (*Node, error) + func Gte(a, b *Node, retSame bool) (*Node, error) + func HadamardDiv(a, b *Node) (*Node, error) + func HadamardProd(a, b *Node) (*Node, error) + func Im2Col(n *Node, kernel, pad, stride, dilation tensor.Shape) (retVal *Node, err error) + func Inverse(a *Node) (*Node, error) + func InverseSqrt(a *Node) (*Node, error) + func KeepDims(a *Node, expandLeft bool, fn func(a *Node) (*Node, error)) (*Node, error) + func LeakyRelu(x *Node, alpha float64) (*Node, error) + func Log(a *Node) (*Node, error) + func Log1p(a *Node) (*Node, error) + func Log2(a *Node) (*Node, error) + func LogSumExp(a *Node, axis int) (retVal *Node, err error) + func Lt(a, b *Node, retSame bool) (*Node, error) + func Lte(a, b *Node, retSame bool) (*Node, error) + func Max(a *Node, along ...int) (retVal *Node, err error) + func MaxBetween(a, b *Node) (retVal *Node, err error) + func MaxPool1D(x *Node, kernel, pad, stride int) (*Node, error) + func MaxPool2D(x *Node, kernel tensor.Shape, pad, stride []int) (*Node, error) + func Mean(a *Node, along ...int) (retVal *Node, err error) + func MinBetween(a, b *Node) (retVal *Node, err error) + func Mish(a *Node) (retVal *Node, err error) + func Mul(a, b *Node) (retVal *Node, err error) + func Must(n *Node, err error, opts ...NodeConsOpt) *Node + func Ne(a, b *Node, retSame bool) (*Node, error) + func Neg(a *Node) (*Node, error) + func NewConstant(v interface{}, opts ...NodeConsOpt) *Node + func NewMatrix(g *ExprGraph, t tensor.Dtype, opts ...NodeConsOpt) *Node + func NewScalar(g *ExprGraph, t tensor.Dtype, opts ...NodeConsOpt) *Node + func NewTensor(g *ExprGraph, t tensor.Dtype, dims int, opts ...NodeConsOpt) *Node + func NewUniqueNode(opts ...NodeConsOpt) *Node + func NewVector(g *ExprGraph, t tensor.Dtype, opts ...NodeConsOpt) *Node + func NodeFromAny(g *ExprGraph, any interface{}, opts ...NodeConsOpt) *Node + func Norm(a *Node, axis, p int) (retVal *Node, err error) + func OneHotVector(id, classes int, t tensor.Dtype, opts ...NodeConsOpt) *Node + func OuterProd(a, b *Node) (retVal *Node, err error) + func Pow(a, b *Node) (*Node, error) + func Ravel(n *Node) (retVal *Node, err error) + func Read(n *Node, into *Value) (retVal *Node) + func Rectify(x *Node) (retVal *Node, err error) + func ReduceAdd(nodes Nodes, opts ...NodeConsOpt) (retVal *Node, err error) + func ReduceMul(nodes Nodes, opts ...NodeConsOpt) (retVal *Node, err error) + func Reshape(n *Node, to tensor.Shape) (retVal *Node, err error) + func Set(a, b *Node) (retVal *Node) + func Sigmoid(a *Node) (*Node, error) + func Sign(a *Node) (*Node, error) + func Sin(a *Node) (*Node, error) + func SizeOf(axis int, x *Node) (retVal *Node, err error) + func Slice(n *Node, slices ...tensor.Slice) (retVal *Node, err error) + func SoftMax(x *Node, axes ...int) (*Node, error) + func Softplus(a *Node) (*Node, error) + func Sparsemax(x *Node, axes ...int) (*Node, error) + func Sqrt(a *Node) (*Node, error) + func Square(a *Node) (*Node, error) + func Sub(a, b *Node) (*Node, error) + func Sum(a *Node, along ...int) (retVal *Node, err error) + func Tanh(a *Node) (*Node, error) + func Tensordot(aAxes []int, bAxes []int, a, b *Node) (retVal *Node, err error) + func Transpose(n *Node, axes ...int) (retVal *Node, err error) + func UniformRandomNode(g *ExprGraph, dt tensor.Dtype, low, high float64, shape ...int) *Node + func Upsample2D(x *Node, scale int) (*Node, error) + func YOLOv3(input *Node, anchors []float32, masks []int, netSize, numClasses int, ...) (*Node, error) + func (n *Node) Clone() (retVal interface{}) + func (n *Node) CloneTo(g *ExprGraph) *Node + func (n *Node) DataSize() int + func (n *Node) Deriv() *Node + func (n *Node) DerivOf() Nodes + func (n *Node) Device() Device + func (n *Node) Dims() int + func (n *Node) Dtype() tensor.Dtype + func (n *Node) Err() error + func (n *Node) Grad() (Value, error) + func (n *Node) GradOnDevice(dev Device, extern External) (retVal Value, allocOnExtern bool, err error) + func (n *Node) Graph() *ExprGraph + func (n *Node) Groups() encoding.Groups + func (n *Node) Hashcode() uint32 + func (n *Node) ID() int64 + func (n *Node) IsColVec() bool + func (n *Node) IsMatrix() bool + func (n *Node) IsRowVec() bool + func (n *Node) IsScalar() bool + func (n *Node) IsVar() bool + func (n *Node) IsVec() bool + func (n *Node) IsVector() bool + func (n *Node) Name() string + func (n *Node) Node() *Node + func (n *Node) Nodes() Nodes + func (n *Node) Op() Op + func (n *Node) RestrictedToDot(up, down int) string + func (n *Node) Shape() tensor.Shape + func (n *Node) Strides() []int + func (n *Node) String() string + func (n *Node) ToDot() string + func (n *Node) Type() hm.Type + func (n *Node) Value() Value + func (n *Node) ValueOnDevice(dev Device, extern External) (retVal Value, allocOnExtern bool, err error) + func (n *Node) WriteHash(h hash.Hash32) + type NodeConsOpt func(*Node) + func In(g *ExprGraph) NodeConsOpt + func WithChildren(children Nodes) NodeConsOpt + func WithGrad(any interface{}) NodeConsOpt + func WithGroupName(name string) NodeConsOpt + func WithInit(fn InitWFn) NodeConsOpt + func WithName(name string) NodeConsOpt + func WithOp(op Op) NodeConsOpt + func WithShape(shp ...int) NodeConsOpt + func WithType(t hm.Type) NodeConsOpt + func WithValue(any interface{}) NodeConsOpt + type NodeID int64 + type NodeSet map[*Node]struct + func NewNodeSet(a ...*Node) NodeSet + func (set *NodeSet) Clear() + func (set NodeSet) Add(i *Node) bool + func (set NodeSet) Cardinality() int + func (set NodeSet) Clone() NodeSet + func (set NodeSet) Contains(i *Node) bool + func (set NodeSet) ContainsAll(i ...*Node) bool + func (set NodeSet) Difference(other NodeSet) NodeSet + func (set NodeSet) Equal(other NodeSet) bool + func (set NodeSet) Intersect(other NodeSet) NodeSet + func (set NodeSet) IsSubset(other NodeSet) bool + func (set NodeSet) IsSuperset(other NodeSet) bool + func (set NodeSet) Iter() <-chan *Node + func (set NodeSet) Remove(i *Node) + func (set NodeSet) SymmetricDifference(other NodeSet) NodeSet + func (set NodeSet) ToSlice() Nodes + func (set NodeSet) Union(other NodeSet) NodeSet + type Nodes []*Node + func Backpropagate(outputs, gradOutputs, wrt Nodes) (retVal Nodes, err error) + func Grad(cost *Node, WRTs ...*Node) (retVal Nodes, err error) + func NodesFromInputs(xs ...Input) (Nodes, error) + func Sort(g *ExprGraph) (sorted Nodes, err error) + func Unconcat(a *Node, along int, n int) (Nodes, error) + func UnstableSort(g *ExprGraph) (sorted Nodes, err error) + func (ns Nodes) Add(n *Node) Nodes + func (ns Nodes) AllSameGraph() bool + func (ns Nodes) Contains(want *Node) bool + func (ns Nodes) Difference(other Nodes) Nodes + func (ns Nodes) Equals(other Nodes) bool + func (ns Nodes) Err() error + func (ns Nodes) Format(s fmt.State, c rune) + func (ns Nodes) Intersect(other Nodes) Nodes + func (ns Nodes) Len() int + func (ns Nodes) Less(i, j int) bool + func (ns Nodes) Node() *Node + func (ns Nodes) Nodes() Nodes + func (ns Nodes) Set() Nodes + func (ns Nodes) Swap(i, j int) + type Op interface + Arity func() int + CallsExtern func() bool + Do func(...Value) (Value, error) + Hashcode func() uint32 + InferShape func(...DimSizer) (tensor.Shape, error) + OverwritesInput func() int + ReturnsPtr func() bool + Type func() hm.Type + WriteHash func(h hash.Hash) + type RMSPropSolver struct + func NewRMSPropSolver(opts ...SolverOpt) *RMSPropSolver + func (s *RMSPropSolver) Step(model []ValueGrad) (err error) + type Reduction uint + const ReductionMean + const ReductionSum + type ReductionOp interface + IsReduction func() bool + type Result interface + func LiftResult(a Input, err error) Result + type SDOp interface + DiffWRT func(inputs int) []bool + SymDiff func(inputs Nodes, output, grad *Node) (retVal Nodes, err error) + type Scalar interface + type Solver interface + Step func([]ValueGrad) error + type SolverOpt func(s Solver) + func WithBatchSize(batch float64) SolverOpt + func WithBeta1(beta1 float64) SolverOpt + func WithBeta2(beta2 float64) SolverOpt + func WithClip(clip float64) SolverOpt + func WithEps(eps float64) SolverOpt + func WithL1Reg(l1reg float64) SolverOpt + func WithL2Reg(l2reg float64) SolverOpt + func WithLearnRate(eta float64) SolverOpt + func WithMomentum(momentum float64) SolverOpt + func WithRho(rho float64) SolverOpt + type StandardEngine struct + func (e StandardEngine) Transpose(a tensor.Tensor, expStrides []int) error + type SymDiffError struct + func (err SymDiffError) Error() string + func (err SymDiffError) Grad() *Node + func (err SymDiffError) Grads() map[*Node]Nodes + func (err SymDiffError) Node() *Node + func (err SymDiffError) Nodes() Nodes + type Tensor interface + DataSize func() int + Dims func() int + Dtype func() tensor.Dtype + Engine func() tensor.Engine + IsManuallyManaged func() bool + IsNativelyAccessible func() bool + IsScalar func() bool + MemSize func() uintptr + Pointer func() unsafe.Pointer + ScalarValue func() interface{} + Shape func() tensor.Shape + Size func() int + Strides func() []int + Uintptr func() uintptr + type TensorType struct + Dims int + Of hm.Type + func (t TensorType) Apply(sub hm.Subs) hm.Substitutable + func (t TensorType) Eq(other hm.Type) bool + func (t TensorType) Format(state fmt.State, c rune) + func (t TensorType) FreeTypeVar() hm.TypeVarSet + func (t TensorType) Name() string + func (t TensorType) Normalize(k, v hm.TypeVarSet) (hm.Type, error) + func (t TensorType) String() string + func (t TensorType) Types() hm.Types + type TrainModeOp interface + SetTraining func(isTraining bool) error + type Typer interface + Type func() hm.Type + type U8 byte + func NewU8(v byte) *U8 + func (v *U8) Data() interface{} + func (v *U8) Dtype() tensor.Dtype + func (v *U8) Format(s fmt.State, c rune) + func (v *U8) MemSize() uintptr + func (v *U8) Pointer() unsafe.Pointer + func (v *U8) Shape() tensor.Shape + func (v *U8) Size() int + func (v *U8) Uintptr() uintptr + type UnaryOp interface + IsUnary func() bool + type UnsafeDoer interface + UnsafeDo func(inputs ...Value) (Value, error) + type UsePreallocDoer interface + UsePreallocDo func(prealloc Value, inputs ...Value) (Value, error) + type VM interface + Close func() error + Reset func() + RunAll func() error + type VMOpt func(m VM) + func BindDualValues(nodes ...*Node) VMOpt + func EvalMode() VMOpt + func ExecuteBwdOnly() VMOpt + func ExecuteFwdOnly() VMOpt + func LogBothDir() VMOpt + func LogBwd() VMOpt + func LogFwd() VMOpt + func TraceExec() VMOpt + func UseCudaFor(ops ...string) VMOpt + func WithEngine(e tensor.Engine) VMOpt + func WithInfWatch() VMOpt + func WithLogger(logger *log.Logger) VMOpt + func WithManualGradient() VMOpt + func WithNaNWatch() VMOpt + func WithPointerWatch() VMOpt + func WithPrecompiled(prog *program, locMap map[*Node]register) VMOpt + func WithValueFmt(format string) VMOpt + func WithWatchlist(list ...interface{}) VMOpt + type Value interface + Data func() interface{} + Dtype func() tensor.Dtype + Shape func() tensor.Shape + Size func() int + func CloneValue(v Value) (Value, error) + func Copy(dest, src Value) (Value, error) + func ScalarAsTensor(v Value, dims int, e tensor.Engine) Value + func ZeroValue(v Value) Value + type ValueCloser interface + ValueClose func(interface{}) bool + type ValueEqualer interface + ValueEq func(Value) bool + type ValueGrad interface + Grad func() (Value, error) + func NodesToValueGrads(in Nodes) (out []ValueGrad) + type Valuer interface + Value func() Value + type VanillaSolver struct + func NewVanillaSolver(opts ...SolverOpt) *VanillaSolver + func (s *VanillaSolver) Step(model []ValueGrad) (err error) + type ZeroValuer interface + ZeroValue func() Value + type Zeroer interface + Zero func()