Documentation ¶
Index ¶
- Constants
- Variables
- func Backward(exec ExecutorHandle) error
- func Cache(a interface{}) *C.char
- func ComposeSymbol(handle SymbolHandle, name string, a ...SymbolHandle) error
- func ContextRandomSeed(seed, devType, devNo int) error
- func FillInfo(nfo *NDArrayInfo) error
- func Fillargs(keys []*C.char, vals []*C.char, ap []interface{}) int
- func Forward(exec ExecutorHandle, train bool) error
- func GetNDArrayRawData(handle NDArrayHandle, p unsafe.Pointer, len int) error
- func ImperativeInvokeInOut1(op MxnetOp, h NDArrayHandle, o NDArrayHandle, a ...interface{}) error
- func ImperativeInvokeInplace1(op MxnetOp, h NDArrayHandle, a ...interface{}) error
- func InferShapes(handle SymbolHandle, with map[string][]int, selector int) (map[string][]int, error)
- func ListNames(handle SymbolHandle, kind int) ([]string, error)
- func OptimizerUpdate(op MxnetOp, params, grads, state1 NDArrayHandle, state2 NDArrayHandle, ...) error
- func RandomSeed(seed int) error
- func ReleaseExecutor(handle ExecutorHandle)
- func ReleaseNDArry(handle NDArrayHandle)
- func ReleaseSymbol(handle SymbolHandle)
- func SetNDArrayRawData(handle NDArrayHandle, p unsafe.Pointer, len int) int
- func ToJson(sym SymbolHandle) ([]byte, error)
- type ExecutorHandle
- type MxnetKey
- type MxnetOp
- type NDArrayHandle
- type NDArrayInfo
- type SymbolHandle
Constants ¶
View Source
const ArgumentsNames = 0
View Source
const AuxNames = 2
View Source
const MaxArgsCount = 16
View Source
const MaxCacheArgsCount = 16 * 2
View Source
const OutoutNames = 1
View Source
const WithArguments = 1
View Source
const WithAuxStates = 4
View Source
const WithOutputs = 2
View Source
const WithoutOutput = 8
Variables ¶
View Source
var GpuCount int = 0
View Source
var LibVersion = 0
Functions ¶
func Backward ¶
func Backward(exec ExecutorHandle) error
func ComposeSymbol ¶
func ComposeSymbol(handle SymbolHandle, name string, a ...SymbolHandle) error
func ContextRandomSeed ¶
func FillInfo ¶
func FillInfo(nfo *NDArrayInfo) error
func Forward ¶
func Forward(exec ExecutorHandle, train bool) error
func GetNDArrayRawData ¶
func GetNDArrayRawData(handle NDArrayHandle, p unsafe.Pointer, len int) error
func ImperativeInvokeInOut1 ¶
func ImperativeInvokeInOut1(op MxnetOp, h NDArrayHandle, o NDArrayHandle, a ...interface{}) error
func ImperativeInvokeInplace1 ¶
func ImperativeInvokeInplace1(op MxnetOp, h NDArrayHandle, a ...interface{}) error
func InferShapes ¶
func OptimizerUpdate ¶
func OptimizerUpdate(op MxnetOp, params, grads, state1 NDArrayHandle, state2 NDArrayHandle, a ...interface{}) error
func RandomSeed ¶
func ReleaseExecutor ¶
func ReleaseExecutor(handle ExecutorHandle)
func ReleaseNDArry ¶
func ReleaseNDArry(handle NDArrayHandle)
func ReleaseSymbol ¶
func ReleaseSymbol(handle SymbolHandle)
func SetNDArrayRawData ¶
func SetNDArrayRawData(handle NDArrayHandle, p unsafe.Pointer, len int) int
func ToJson ¶
func ToJson(sym SymbolHandle) ([]byte, error)
Types ¶
type ExecutorHandle ¶
type ExecutorHandle = C.ExecutorHandle
func Bind ¶
func Bind(symbol SymbolHandle, devType, devNo int, args []NDArrayHandle, grads []NDArrayHandle, aux []NDArrayHandle) (ExecutorHandle, error)
type MxnetKey ¶
type MxnetKey int
const ( KeyEmpty MxnetKey = iota KeyLow KeyHigh KeyScalar KeyLhs KeyRhs KeyData KeyExclude KeyAxis KeyMode KeyNormalization KeyLr KeyMomentum KeyWd KeyBeta1 KeyBeta2 KeyEpsilon KeyEps KeyLoc KeyScale KeyKeepdims KeyNoBias KeyNumGroup KeyNumFilter KeyKernel KeyStride KeyPad KeyActType KeyPoolType KeyPoolConv KeyFlatten KeyNumHidden KeyMultiOutput KeyNumArgs KeyNoKey )
type MxnetOp ¶
type MxnetOp int
const ( OpEmpty MxnetOp = iota OpRandomUniform OpRandomNormal OpCopyTo OpAdd OpAddScalar OpSub OpSubScalar OpSubScalarR OpMul OpMulScalar OpDiv OpDivScalar OpDivScalarR OpMean OpStack OpAbs OpBlockGrad OpMakeLoss OpZeros OpPowerScalar OpPowerScalarR OpSgdUpdate OpSgdMomUpdate OpAdamUpdate OpLogSoftmax OpSoftmax OpSoftmaxOutput OpSoftmaxCE OpSoftmaxAC OpSum OpDot OpPick OpSquare OpConcat OpConvolution OpActivation OpPooling OpFullyConnected OpFlatten OpLog OpCosh OpNot OpSigmoid OpTanh OpSin OpBatchNorm OpNoOp )
type NDArrayInfo ¶
type NDArrayInfo struct { Handle NDArrayHandle Dim []int Type int }
func GetOutputs ¶
func GetOutputs(exec ExecutorHandle) ([]NDArrayInfo, error)
type SymbolHandle ¶
type SymbolHandle = C.SymbolHandle
func CreateVariable ¶
func CreateVariable(name string) (SymbolHandle, int)
func GetInternals ¶
func GetInternals(s SymbolHandle) (SymbolHandle, error)
func GroupSymbols ¶
func GroupSymbols(s []SymbolHandle) (SymbolHandle, error)
Click to show internal directories.
Click to hide internal directories.