Documentation
¶
Index ¶
- Variables
- type Abs
- type Add
- type And
- type AveragePool
- type BatchNormalization
- type Ceil
- type ComputationalGraph
- func (g *ComputationalGraph) Backward()
- func (g *ComputationalGraph) Forward()
- func (g *ComputationalGraph) GetOutput() *GraphTensor
- func (g *ComputationalGraph) GetTensorByName(name string) *GraphTensor
- func (g *ComputationalGraph) GetTensors() map[string]*GraphTensor
- func (g *ComputationalGraph) NewGraphTensor(data []float32, shape []int, name string) *GraphTensor
- func (g *ComputationalGraph) PrintStructure()
- func (g *ComputationalGraph) Reset()
- func (g *ComputationalGraph) SetInput(t *GraphTensor, data []float32)
- func (g *ComputationalGraph) SetOutput(t *GraphTensor)
- func (g *ComputationalGraph) ToONNXModel() (*ONNX, error)
- type Conv
- type Div
- type Dropout
- type Exp
- type Flatten
- type Floor
- type Gemm
- type GlobalAveragePool
- type GlobalMaxPool
- type GraphExport
- type GraphTensor
- func (t *GraphTensor) Abs(names ...string) *GraphTensor
- func (t *GraphTensor) Add(other *GraphTensor, names ...string) *GraphTensor
- func (t *GraphTensor) And(other *GraphTensor, names ...string) *GraphTensor
- func (t *GraphTensor) AveragePool(kernel, stride, padding []int, name string) *GraphTensor
- func (t *GraphTensor) BatchNormalization(gamma, beta *GraphTensor, epsilon, momentum float32, names ...string) *GraphTensor
- func (t *GraphTensor) Ceil(names ...string) *GraphTensor
- func (t *GraphTensor) Conv(weight *GraphTensor, stride, padding []int, names ...string) *GraphTensor
- func (t *GraphTensor) Div(other *GraphTensor, names ...string) *GraphTensor
- func (t *GraphTensor) Dropout(p float32, names ...string) *GraphTensor
- func (t *GraphTensor) Exp(names ...string) *GraphTensor
- func (t *GraphTensor) Flatten(names ...string) *GraphTensor
- func (t *GraphTensor) Floor(names ...string) *GraphTensor
- func (t *GraphTensor) Gemm(b, c *GraphTensor, transA, transB bool, alpha, beta float32, names ...string) *GraphTensor
- func (t *GraphTensor) GlobalAveragePool(name string) *GraphTensor
- func (t *GraphTensor) GlobalMaxPool(name string) *GraphTensor
- func (t *GraphTensor) Grad() *tensor.Tensor
- func (t *GraphTensor) Hardmax(names ...string) *GraphTensor
- func (t *GraphTensor) InstanceNormalization(epsilon float32, names ...string) *GraphTensor
- func (t *GraphTensor) IsComputed() bool
- func (t *GraphTensor) LRN(size int, alpha, beta, k float32, names ...string) *GraphTensor
- func (t *GraphTensor) Log(names ...string) *GraphTensor
- func (t *GraphTensor) LogSoftmax(names ...string) *GraphTensor
- func (t *GraphTensor) LpNormalization(p float32, axis int, epsilon float32, names ...string) *GraphTensor
- func (t *GraphTensor) LpPool(kernel, strides []int, p float32, names ...string) *GraphTensor
- func (t *GraphTensor) MatMul(other *GraphTensor, names ...string) *GraphTensor
- func (t *GraphTensor) MaxPool(kernel, stride, padding []int, name string) *GraphTensor
- func (t *GraphTensor) MaxRoiPool(rois *GraphTensor, pooledHeight, pooledWidth int, names ...string) *GraphTensor
- func (t *GraphTensor) Multiply(other *GraphTensor, names ...string) *GraphTensor
- func (t *GraphTensor) Neg(names ...string) *GraphTensor
- func (t *GraphTensor) Not(names ...string) *GraphTensor
- func (t *GraphTensor) Or(other *GraphTensor, names ...string) *GraphTensor
- func (t *GraphTensor) Pad(pads [][2]int, val float32, names ...string) *GraphTensor
- func (t *GraphTensor) Pow(exponent *GraphTensor, names ...string) *GraphTensor
- func (t *GraphTensor) ReLU(names ...string) *GraphTensor
- func (t *GraphTensor) Reciprocal(names ...string) *GraphTensor
- func (t *GraphTensor) Reshape(shape []int, names ...string) *GraphTensor
- func (t *GraphTensor) SetComputed(computed bool)
- func (t *GraphTensor) SetGrad(grad *tensor.Tensor)
- func (t *GraphTensor) SetValue(value *tensor.Tensor)
- func (t *GraphTensor) Sigmoid(names ...string) *GraphTensor
- func (t *GraphTensor) Slice(starts, ends []int, names ...string) *GraphTensor
- func (t *GraphTensor) Softmax(names ...string) *GraphTensor
- func (t *GraphTensor) Sqrt(names ...string) *GraphTensor
- func (t *GraphTensor) Squeeze(names ...string) *GraphTensor
- func (t *GraphTensor) Sub(other *GraphTensor, names ...string) *GraphTensor
- func (t *GraphTensor) Sum(names ...string) *GraphTensor
- func (t *GraphTensor) Tanh(names ...string) *GraphTensor
- func (t *GraphTensor) Tile(repeats []int, names ...string) *GraphTensor
- func (t *GraphTensor) Transpose(perm []int, names ...string) *GraphTensor
- func (t *GraphTensor) Unsqueeze(axis int, names ...string) *GraphTensor
- func (t *GraphTensor) UpdateAll(graphTensor *GraphTensor)
- func (t *GraphTensor) Value() *tensor.Tensor
- func (t *GraphTensor) Xor(other *GraphTensor, names ...string) *GraphTensor
- type Hardmax
- type InputNode
- func (n *InputNode) Backward(grad *tensor.Tensor)
- func (n *InputNode) Forward() *tensor.Tensor
- func (n *InputNode) GetChildren() []Node
- func (n *InputNode) GetGrad() *tensor.Tensor
- func (n *InputNode) GetName() string
- func (m *InputNode) GetONNXNodeInfo() *ONNXNodeInfo
- func (n *InputNode) GetOutput() *GraphTensor
- func (n *InputNode) ResetComputed()
- type InstanceNormalization
- type LRN
- type Log
- type LogSoftmax
- type LpNormalization
- type LpPool
- type MatMul
- type MaxPool
- type MaxRoiPool
- type Multiply
- type Neg
- type Node
- type NodeExport
- type Not
- type ONNX
- type ONNXNodeInfo
- type ONNXOperator
- type OPSNode
- type OPSTensor
- type Or
- type Pad
- type Pow
- type ReLU
- type Reciprocal
- type Reshape
- type Sigmoid
- type Slice
- type Softmax
- type Sqrt
- type Squeeze
- type Sub
- type Sum
- type Tanh
- type TensorExport
- type Tile
- type Transpose
- type Unsqueeze
- type Xor
Constants ¶
This section is empty.
Variables ¶
View Source
var ONNXOperators = []ONNXOperator{}/* 222 elements not displayed */
Functions ¶
This section is empty.
Types ¶
type Abs ¶
func NewAbs ¶
func NewAbs(name string, a *GraphTensor) *Abs
func (*Abs) GetOutput ¶
func (m *Abs) GetOutput() *GraphTensor
type Add ¶
type Add struct { *OPSNode Name string Children []*GraphTensor // contains filtered or unexported fields }
func NewAdd ¶
func NewAdd(name string, a, b *GraphTensor) *Add
func (*Add) GetChildren ¶
func (*Add) GetOutput ¶
func (a *Add) GetOutput() *GraphTensor
func (*Add) ResetComputed ¶
func (a *Add) ResetComputed()
type And ¶
func NewAnd ¶
func NewAnd(name string, a, b *GraphTensor) *And
func (*And) GetOutput ¶
func (m *And) GetOutput() *GraphTensor
type AveragePool ¶
func NewAveragePool ¶
func NewAveragePool(name string, input *GraphTensor, kernel, stride, padding []int) *AveragePool
func (*AveragePool) Backward ¶
func (m *AveragePool) Backward(grad *tensor.Tensor)
func (*AveragePool) Forward ¶
func (m *AveragePool) Forward() *tensor.Tensor
func (*AveragePool) GetOutput ¶
func (m *AveragePool) GetOutput() *GraphTensor
type BatchNormalization ¶
func NewBatchNormalization ¶
func NewBatchNormalization(name string, input, gamma, beta *GraphTensor, epsilon, momentum float32) *BatchNormalization
func (*BatchNormalization) Backward ¶
func (bn *BatchNormalization) Backward(grad *tensor.Tensor)
func (*BatchNormalization) Forward ¶
func (bn *BatchNormalization) Forward() *tensor.Tensor
func (*BatchNormalization) GetOutput ¶
func (m *BatchNormalization) GetOutput() *GraphTensor
type Ceil ¶
func NewCeil ¶
func NewCeil(name string, a *GraphTensor) *Ceil
func (*Ceil) GetOutput ¶
func (m *Ceil) GetOutput() *GraphTensor
type ComputationalGraph ¶
type ComputationalGraph struct { Nodes []Node Tensors map[string]*GraphTensor NodeCount int // contains filtered or unexported fields }
func NewComputationalGraph ¶
func NewComputationalGraph() *ComputationalGraph
func (*ComputationalGraph) Backward ¶
func (g *ComputationalGraph) Backward()
func (*ComputationalGraph) Forward ¶
func (g *ComputationalGraph) Forward()
func (*ComputationalGraph) GetOutput ¶
func (g *ComputationalGraph) GetOutput() *GraphTensor
func (*ComputationalGraph) GetTensorByName ¶
func (g *ComputationalGraph) GetTensorByName(name string) *GraphTensor
func (*ComputationalGraph) GetTensors ¶
func (g *ComputationalGraph) GetTensors() map[string]*GraphTensor
func (*ComputationalGraph) NewGraphTensor ¶
func (g *ComputationalGraph) NewGraphTensor(data []float32, shape []int, name string) *GraphTensor
func (*ComputationalGraph) PrintStructure ¶
func (g *ComputationalGraph) PrintStructure()
func (*ComputationalGraph) Reset ¶
func (g *ComputationalGraph) Reset()
func (*ComputationalGraph) SetInput ¶
func (g *ComputationalGraph) SetInput(t *GraphTensor, data []float32)
func (*ComputationalGraph) SetOutput ¶
func (g *ComputationalGraph) SetOutput(t *GraphTensor)
func (*ComputationalGraph) ToONNXModel ¶
func (g *ComputationalGraph) ToONNXModel() (*ONNX, error)
type Conv ¶
type Conv struct { *OPSNode OPSTensor StrideH int StrideW int PadH int PadW int // contains filtered or unexported fields }
func NewConv ¶
func NewConv(name string, strideH, strideW, padH, padW int, input, weight *GraphTensor) *Conv
func (*Conv) GetOutput ¶
func (m *Conv) GetOutput() *GraphTensor
type Div ¶
func NewDiv ¶
func NewDiv(name string, a, b *GraphTensor) *Div
func (*Div) GetOutput ¶
func (m *Div) GetOutput() *GraphTensor
type Dropout ¶
func NewDropout ¶
func NewDropout(name string, input *GraphTensor, p float32) *Dropout
func (*Dropout) GetOutput ¶
func (m *Dropout) GetOutput() *GraphTensor
type Exp ¶
func NewExp ¶
func NewExp(name string, a *GraphTensor) *Exp
func (*Exp) GetOutput ¶
func (m *Exp) GetOutput() *GraphTensor
type Flatten ¶
func NewFlatten ¶
func NewFlatten(name string, a *GraphTensor) *Flatten
func (*Flatten) GetOutput ¶
func (m *Flatten) GetOutput() *GraphTensor
type Floor ¶
func NewFloor ¶
func NewFloor(name string, a *GraphTensor) *Floor
func (*Floor) GetOutput ¶
func (m *Floor) GetOutput() *GraphTensor
type Gemm ¶
func NewGemm ¶
func NewGemm(name string, transA, transB bool, alpha, beta float32, a, b, c *GraphTensor) *Gemm
func (*Gemm) GetOutput ¶
func (m *Gemm) GetOutput() *GraphTensor
type GlobalAveragePool ¶
func NewGlobalAveragePool ¶
func NewGlobalAveragePool(name string, input *GraphTensor) *GlobalAveragePool
func (*GlobalAveragePool) Backward ¶
func (m *GlobalAveragePool) Backward(grad *tensor.Tensor)
func (*GlobalAveragePool) Forward ¶
func (m *GlobalAveragePool) Forward() *tensor.Tensor
func (*GlobalAveragePool) GetOutput ¶
func (m *GlobalAveragePool) GetOutput() *GraphTensor
type GlobalMaxPool ¶
func NewGlobalMaxPool ¶
func NewGlobalMaxPool(name string, input *GraphTensor) *GlobalMaxPool
func (*GlobalMaxPool) Backward ¶
func (m *GlobalMaxPool) Backward(grad *tensor.Tensor)
func (*GlobalMaxPool) Forward ¶
func (m *GlobalMaxPool) Forward() *tensor.Tensor
func (*GlobalMaxPool) GetOutput ¶
func (m *GlobalMaxPool) GetOutput() *GraphTensor
type GraphExport ¶
type GraphExport struct { Nodes []NodeExport `json:"nodes"` Tensors []TensorExport `json:"tensors"` Output string `json:"output"` }
type GraphTensor ¶
type GraphTensor struct { Name string Shape []int Node Node Graph *ComputationalGraph // contains filtered or unexported fields }
func (*GraphTensor) Abs ¶
func (t *GraphTensor) Abs(names ...string) *GraphTensor
func (*GraphTensor) Add ¶
func (t *GraphTensor) Add(other *GraphTensor, names ...string) *GraphTensor
func (*GraphTensor) And ¶
func (t *GraphTensor) And(other *GraphTensor, names ...string) *GraphTensor
func (*GraphTensor) AveragePool ¶
func (t *GraphTensor) AveragePool(kernel, stride, padding []int, name string) *GraphTensor
func (*GraphTensor) BatchNormalization ¶
func (t *GraphTensor) BatchNormalization(gamma, beta *GraphTensor, epsilon, momentum float32, names ...string) *GraphTensor
func (*GraphTensor) Ceil ¶
func (t *GraphTensor) Ceil(names ...string) *GraphTensor
func (*GraphTensor) Conv ¶
func (t *GraphTensor) Conv(weight *GraphTensor, stride, padding []int, names ...string) *GraphTensor
func (*GraphTensor) Div ¶
func (t *GraphTensor) Div(other *GraphTensor, names ...string) *GraphTensor
func (*GraphTensor) Dropout ¶
func (t *GraphTensor) Dropout(p float32, names ...string) *GraphTensor
func (*GraphTensor) Exp ¶
func (t *GraphTensor) Exp(names ...string) *GraphTensor
func (*GraphTensor) Flatten ¶
func (t *GraphTensor) Flatten(names ...string) *GraphTensor
func (*GraphTensor) Floor ¶
func (t *GraphTensor) Floor(names ...string) *GraphTensor
func (*GraphTensor) Gemm ¶
func (t *GraphTensor) Gemm(b, c *GraphTensor, transA, transB bool, alpha, beta float32, names ...string) *GraphTensor
func (*GraphTensor) GlobalAveragePool ¶
func (t *GraphTensor) GlobalAveragePool(name string) *GraphTensor
func (*GraphTensor) GlobalMaxPool ¶
func (t *GraphTensor) GlobalMaxPool(name string) *GraphTensor
func (*GraphTensor) Grad ¶
func (t *GraphTensor) Grad() *tensor.Tensor
func (*GraphTensor) Hardmax ¶
func (t *GraphTensor) Hardmax(names ...string) *GraphTensor
func (*GraphTensor) InstanceNormalization ¶
func (t *GraphTensor) InstanceNormalization(epsilon float32, names ...string) *GraphTensor
func (*GraphTensor) IsComputed ¶
func (t *GraphTensor) IsComputed() bool
func (*GraphTensor) LRN ¶
func (t *GraphTensor) LRN(size int, alpha, beta, k float32, names ...string) *GraphTensor
func (*GraphTensor) Log ¶
func (t *GraphTensor) Log(names ...string) *GraphTensor
func (*GraphTensor) LogSoftmax ¶
func (t *GraphTensor) LogSoftmax(names ...string) *GraphTensor
func (*GraphTensor) LpNormalization ¶
func (t *GraphTensor) LpNormalization(p float32, axis int, epsilon float32, names ...string) *GraphTensor
func (*GraphTensor) LpPool ¶
func (t *GraphTensor) LpPool(kernel, strides []int, p float32, names ...string) *GraphTensor
func (*GraphTensor) MatMul ¶
func (t *GraphTensor) MatMul(other *GraphTensor, names ...string) *GraphTensor
func (*GraphTensor) MaxPool ¶
func (t *GraphTensor) MaxPool(kernel, stride, padding []int, name string) *GraphTensor
func (*GraphTensor) MaxRoiPool ¶
func (t *GraphTensor) MaxRoiPool(rois *GraphTensor, pooledHeight, pooledWidth int, names ...string) *GraphTensor
func (*GraphTensor) Multiply ¶
func (t *GraphTensor) Multiply(other *GraphTensor, names ...string) *GraphTensor
func (*GraphTensor) Neg ¶
func (t *GraphTensor) Neg(names ...string) *GraphTensor
func (*GraphTensor) Not ¶
func (t *GraphTensor) Not(names ...string) *GraphTensor
func (*GraphTensor) Or ¶
func (t *GraphTensor) Or(other *GraphTensor, names ...string) *GraphTensor
func (*GraphTensor) Pad ¶
func (t *GraphTensor) Pad(pads [][2]int, val float32, names ...string) *GraphTensor
func (*GraphTensor) Pow ¶
func (t *GraphTensor) Pow(exponent *GraphTensor, names ...string) *GraphTensor
func (*GraphTensor) ReLU ¶
func (t *GraphTensor) ReLU(names ...string) *GraphTensor
func (*GraphTensor) Reciprocal ¶
func (t *GraphTensor) Reciprocal(names ...string) *GraphTensor
func (*GraphTensor) Reshape ¶
func (t *GraphTensor) Reshape(shape []int, names ...string) *GraphTensor
func (*GraphTensor) SetComputed ¶
func (t *GraphTensor) SetComputed(computed bool)
func (*GraphTensor) SetGrad ¶
func (t *GraphTensor) SetGrad(grad *tensor.Tensor)
func (*GraphTensor) SetValue ¶
func (t *GraphTensor) SetValue(value *tensor.Tensor)
func (*GraphTensor) Sigmoid ¶
func (t *GraphTensor) Sigmoid(names ...string) *GraphTensor
func (*GraphTensor) Slice ¶
func (t *GraphTensor) Slice(starts, ends []int, names ...string) *GraphTensor
func (*GraphTensor) Softmax ¶
func (t *GraphTensor) Softmax(names ...string) *GraphTensor
func (*GraphTensor) Sqrt ¶
func (t *GraphTensor) Sqrt(names ...string) *GraphTensor
func (*GraphTensor) Squeeze ¶
func (t *GraphTensor) Squeeze(names ...string) *GraphTensor
func (*GraphTensor) Sub ¶
func (t *GraphTensor) Sub(other *GraphTensor, names ...string) *GraphTensor
func (*GraphTensor) Sum ¶
func (t *GraphTensor) Sum(names ...string) *GraphTensor
func (*GraphTensor) Tanh ¶
func (t *GraphTensor) Tanh(names ...string) *GraphTensor
func (*GraphTensor) Tile ¶
func (t *GraphTensor) Tile(repeats []int, names ...string) *GraphTensor
func (*GraphTensor) Transpose ¶
func (t *GraphTensor) Transpose(perm []int, names ...string) *GraphTensor
func (*GraphTensor) Unsqueeze ¶
func (t *GraphTensor) Unsqueeze(axis int, names ...string) *GraphTensor
func (*GraphTensor) UpdateAll ¶
func (t *GraphTensor) UpdateAll(graphTensor *GraphTensor)
func (*GraphTensor) Value ¶
func (t *GraphTensor) Value() *tensor.Tensor
func (*GraphTensor) Xor ¶
func (t *GraphTensor) Xor(other *GraphTensor, names ...string) *GraphTensor
type Hardmax ¶
func NewHardmax ¶
func NewHardmax(name string, a *GraphTensor) *Hardmax
func (*Hardmax) GetOutput ¶
func (m *Hardmax) GetOutput() *GraphTensor
type InputNode ¶
type InputNode struct { Name string // contains filtered or unexported fields }
func (*InputNode) GetChildren ¶
func (*InputNode) GetONNXNodeInfo ¶
func (m *InputNode) GetONNXNodeInfo() *ONNXNodeInfo
func (*InputNode) GetOutput ¶
func (n *InputNode) GetOutput() *GraphTensor
func (*InputNode) ResetComputed ¶
func (n *InputNode) ResetComputed()
type InstanceNormalization ¶
func NewInstanceNormalization ¶
func NewInstanceNormalization(name string, input *GraphTensor, epsilon float32) *InstanceNormalization
func (*InstanceNormalization) Backward ¶
func (m *InstanceNormalization) Backward(grad *tensor.Tensor)
func (*InstanceNormalization) Forward ¶
func (m *InstanceNormalization) Forward() *tensor.Tensor
func (*InstanceNormalization) GetOutput ¶
func (m *InstanceNormalization) GetOutput() *GraphTensor
type Log ¶
func NewLog ¶
func NewLog(name string, a *GraphTensor) *Log
func (*Log) GetOutput ¶
func (m *Log) GetOutput() *GraphTensor
type LogSoftmax ¶
func NewLogSoftmax ¶
func NewLogSoftmax(name string, a *GraphTensor) *LogSoftmax
func (*LogSoftmax) Backward ¶
func (m *LogSoftmax) Backward(grad *tensor.Tensor)
func (*LogSoftmax) Forward ¶
func (m *LogSoftmax) Forward() *tensor.Tensor
func (*LogSoftmax) GetOutput ¶
func (m *LogSoftmax) GetOutput() *GraphTensor
type LpNormalization ¶
func NewLpNormalization ¶
func NewLpNormalization(name string, input *GraphTensor, p float32, axis int, epsilon float32) *LpNormalization
func (*LpNormalization) Backward ¶
func (m *LpNormalization) Backward(grad *tensor.Tensor)
func (*LpNormalization) Forward ¶
func (m *LpNormalization) Forward() *tensor.Tensor
func (*LpNormalization) GetOutput ¶
func (m *LpNormalization) GetOutput() *GraphTensor
type LpPool ¶
func NewLpPool ¶
func NewLpPool(name string, input *GraphTensor, kernel, strides []int, p float32) *LpPool
func (*LpPool) GetOutput ¶
func (m *LpPool) GetOutput() *GraphTensor
type MatMul ¶
func NewMatMul ¶
func NewMatMul(name string, a, b *GraphTensor) *MatMul
func (*MatMul) GetOutput ¶
func (m *MatMul) GetOutput() *GraphTensor
type MaxPool ¶
func NewMaxPool ¶
func NewMaxPool(name string, input *GraphTensor, kernel, stride, padding []int) *MaxPool
func (*MaxPool) GetOutput ¶
func (m *MaxPool) GetOutput() *GraphTensor
type MaxRoiPool ¶
type MaxRoiPool struct { *OPSNode OPSTensor PooledHeight int PooledWidth int // contains filtered or unexported fields }
func NewMaxRoiPool ¶
func NewMaxRoiPool(name string, featureMap, rois *GraphTensor, pooledHeight, pooledWidth int) *MaxRoiPool
func (*MaxRoiPool) Backward ¶
func (m *MaxRoiPool) Backward(grad *tensor.Tensor)
func (*MaxRoiPool) Forward ¶
func (m *MaxRoiPool) Forward() *tensor.Tensor
func (*MaxRoiPool) GetOutput ¶
func (m *MaxRoiPool) GetOutput() *GraphTensor
type Multiply ¶
type Multiply struct { *OPSNode Name string Children []*GraphTensor // contains filtered or unexported fields }
func NewMultiply ¶
func NewMultiply(name string, a, b *GraphTensor) *Multiply
func (*Multiply) GetChildren ¶
func (*Multiply) GetOutput ¶
func (m *Multiply) GetOutput() *GraphTensor
func (*Multiply) ResetComputed ¶
func (m *Multiply) ResetComputed()
type Neg ¶
func NewNeg ¶
func NewNeg(name string, a *GraphTensor) *Neg
func (*Neg) GetOutput ¶
func (m *Neg) GetOutput() *GraphTensor
type Node ¶
type Node interface { Forward() *tensor.Tensor Backward(grad *tensor.Tensor) GetName() string ResetComputed() //OPSNode GetONNXNodeInfo() *ONNXNodeInfo GetChildren() []Node GetOutput() *GraphTensor }
type NodeExport ¶
type Not ¶
func NewNot ¶
func NewNot(name string, a *GraphTensor) *Not
func (*Not) GetOutput ¶
func (m *Not) GetOutput() *GraphTensor
type ONNXNodeInfo ¶
type ONNXOperator ¶
type ONNXOperator struct { Name string InputPCount int OutputPCount int Ignore bool AliasList []string NodeRegistryFunc func(name string, children []*GraphTensor, output *GraphTensor) Node }
func GetONNXNodeInfoByName ¶
func GetONNXNodeInfoByName(name string) *ONNXOperator
type OPSNode ¶
func NewOPSNode ¶
func (*OPSNode) GetONNXNodeInfo ¶
func (m *OPSNode) GetONNXNodeInfo() *ONNXNodeInfo
type OPSTensor ¶
type OPSTensor struct { Name string Children []*GraphTensor // contains filtered or unexported fields }
func (*OPSTensor) GetChildren ¶
func (*OPSTensor) GetTensorOutput ¶
func (m *OPSTensor) GetTensorOutput() *GraphTensor
func (*OPSTensor) ResetComputed ¶
func (m *OPSTensor) ResetComputed()
type Or ¶
func NewOr ¶
func NewOr(name string, a, b *GraphTensor) *Or
func (*Or) GetOutput ¶
func (m *Or) GetOutput() *GraphTensor
type Pow ¶
func NewPow ¶
func NewPow(name string, base, exponent *GraphTensor) *Pow
func (*Pow) GetOutput ¶
func (m *Pow) GetOutput() *GraphTensor
type ReLU ¶
func NewReLU ¶
func NewReLU(name string, a *GraphTensor) *ReLU
func (*ReLU) GetOutput ¶
func (m *ReLU) GetOutput() *GraphTensor
type Reciprocal ¶
func NewReciprocal ¶
func NewReciprocal(name string, a *GraphTensor) *Reciprocal
func (*Reciprocal) Backward ¶
func (m *Reciprocal) Backward(grad *tensor.Tensor)
func (*Reciprocal) Forward ¶
func (m *Reciprocal) Forward() *tensor.Tensor
func (*Reciprocal) GetOutput ¶
func (m *Reciprocal) GetOutput() *GraphTensor
type Reshape ¶
func NewReshape ¶
func NewReshape(name string, a *GraphTensor, shape []int) *Reshape
func (*Reshape) GetOutput ¶
func (m *Reshape) GetOutput() *GraphTensor
type Sigmoid ¶
func NewSigmoid ¶
func NewSigmoid(name string, a *GraphTensor) *Sigmoid
func (*Sigmoid) GetOutput ¶
func (m *Sigmoid) GetOutput() *GraphTensor
type Softmax ¶
func NewSoftmax ¶
func NewSoftmax(name string, a *GraphTensor) *Softmax
func (*Softmax) GetOutput ¶
func (m *Softmax) GetOutput() *GraphTensor
type Sqrt ¶
func NewSqrt ¶
func NewSqrt(name string, a *GraphTensor) *Sqrt
func (*Sqrt) GetOutput ¶
func (m *Sqrt) GetOutput() *GraphTensor
type Squeeze ¶
func NewSqueeze ¶
func NewSqueeze(name string, a *GraphTensor) *Squeeze
func (*Squeeze) GetOutput ¶
func (m *Squeeze) GetOutput() *GraphTensor
type Sub ¶
func NewSub ¶
func NewSub(name string, a, b *GraphTensor) *Sub
func (*Sub) GetOutput ¶
func (m *Sub) GetOutput() *GraphTensor
type Sum ¶
type Sum struct { Name string Children []*GraphTensor // contains filtered or unexported fields }
func NewSum ¶
func NewSum(name string, a *GraphTensor) *Sum
func (*Sum) GetChildren ¶
func (*Sum) GetONNXNodeInfo ¶
func (m *Sum) GetONNXNodeInfo() *ONNXNodeInfo
func (*Sum) GetOutput ¶
func (m *Sum) GetOutput() *GraphTensor
func (*Sum) ResetComputed ¶
func (m *Sum) ResetComputed()
type Tanh ¶
func NewTanh ¶
func NewTanh(name string, a *GraphTensor) *Tanh
func (*Tanh) GetOutput ¶
func (m *Tanh) GetOutput() *GraphTensor
type TensorExport ¶
type Transpose ¶
func NewTranspose ¶
func NewTranspose(name string, a *GraphTensor, perm, inverse []int) *Transpose
func (*Transpose) GetOutput ¶
func (m *Transpose) GetOutput() *GraphTensor
type Unsqueeze ¶
func NewUnsqueeze ¶
func NewUnsqueeze(name string, a *GraphTensor, axis int) *Unsqueeze
func (*Unsqueeze) GetOutput ¶
func (m *Unsqueeze) GetOutput() *GraphTensor
Source Files
¶
- compute_graph.go
- compute_graph_common.go
- compute_graph_onnx.go
- internal_sum.go
- logical_bitwise_and.go
- logical_bitwise_not.go
- logical_bitwise_or.go
- logical_bitwise_xor.go
- math_abs.go
- math_ceil.go
- math_div.go
- math_exp.go
- math_floor.go
- math_log.go
- math_matmul.go
- math_neg.go
- math_pow.go
- math_reciprocal.go
- math_sqrt.go
- math_sub.go
- nn_average_pool.go
- nn_batch_normalization.go
- nn_conv.go
- nn_dropout.go
- nn_gemm.go
- nn_global_average_pool.go
- nn_global_max_pool.go
- nn_hardmax.go
- nn_instance_normalization.go
- nn_logsoftmax.go
- nn_lp_normalization.go
- nn_lp_pool.go
- nn_lrn.go
- nn_max_pool.go
- nn_max_roi_pool.go
- nn_relu.go
- nn_sigmoid.go
- nn_softmax.go
- nn_tanh.go
- ops_node.go
- ops_tensor.go
- shape_manipulate_flatten.go
- shape_manipulate_pad.go
- shape_manipulate_reshape.go
- shape_manipulate_slice.go
- shape_manipulate_squeeze.go
- shape_manipulate_tile.go
- shape_manipulate_transpose.go
- shape_manipulate_unsqueeze.go
Click to show internal directories.
Click to hide internal directories.