mxnet-0.1.0.1: MXNet interface in Haskell.

Copyright(c) 2016 Tao He
LicenseMIT
Maintainersighingnow@gmail.com
Safe HaskellSafe
LanguageHaskell2010

MXNet.Core.Predict.Base

Contents

Description

Predict interfaces in core module of MXNet.

Synopsis

Data types

Re-exports functions.

mxGetLastError :: IO String Source #

Handle size_t type.

Get the string message of last error.

mxPredCreate Source #

Arguments

:: String

The JSON string of the symbol.

-> Ptr ()

The in-memory raw bytes of parameter ndarray file.

-> Int

The size of parameter ndarray file.

-> Int

The device type, 1: cpu, 2:gpu.

-> Int

The device id of the predictor.

-> MXUInt

Number of input nodes to the net.

-> [String]

The name of input argument.

-> [MXUInt] 
-> [MXUInt] 
-> IO (Int, PredictorHandle)

The created predictor handle.

Create a predictor.

mxPredCreatePartialOut Source #

Arguments

:: String 
-> Ptr () 
-> Int 
-> Int 
-> Int 
-> MXUInt 
-> [String]

The names of input arguments.

-> [MXUInt] 
-> [MXUInt] 
-> MXUInt

Number of output nodes to the net.

-> IO (Int, String, PredictorHandle)

The name of output argument and created predictor handle.

Create a predictor wich customized outputs.

mxPredGetOutputShape Source #

Arguments

:: PredictorHandle

The predictor handle.

-> MXUInt

The index of output node, set to 0 if there is only one output.

-> IO (Int, [MXUInt], MXUInt)

Output dimension and the shape data.

Get the shape of output node.

mxPredSetInput Source #

Arguments

:: PredictorHandle 
-> String

The name of input node to set.

-> [MXFloat]

The pointer to the data to be set.

-> MXUInt

The size of data array, used for safety check.

-> IO Int 

Set the input data of predictor.

mxPredForward :: PredictorHandle -> IO Int Source #

Run a forward pass to get the output.

mxPredPartialForward Source #

Arguments

:: PredictorHandle 
-> Int

The current step to run forward on.

-> IO (Int, Int)

The number of steps left.

Run a interactive forward pass to get the output.

mxPredGetOutput Source #

Arguments

:: PredictorHandle 
-> MXUInt

The index of output node, set to 0 if there is only one output.

-> Ptr MXFloat

User allocated data to hold the output.

-> MXUInt

The size of data array, used for safe checking.

-> IO Int 

Get the output value of prediction.

mxPredFree :: PredictorHandle -> IO Int Source #

Free a predictor handle.

mxNDListCreate Source #

Arguments

:: Ptr CChar

The byte contents of nd file to be loaded.

-> Int

The size of the nd file to be loaded.

-> IO (Int, NDListHandle, MXUInt)

The out put NDListHandle and length of the list.

Create a NDArray List by loading from ndarray file.

mxNDListGet Source #

Arguments

:: NDListHandle 
-> MXUInt

The index in the list.

-> IO (Int, String, Ptr MXFloat, [MXUInt], MXUInt)

The name of output, the data region of the item, the shape of the item and shape's dimension.

Get an element from list.

mxNDListFree :: NDListHandle -> IO Int Source #

Free a predictor handle.