C# Class Ocronet.Dynamic.Recognizers.Lenet.LenetWrapper

Show file Open project: nickun/OCRonet Class Usage Examples

Public Properties

Property Type Description
AsciiTarget bool
C2i int>.Dictionary
Classes int[]
HrLenet System.IntPtr
NetNorm bool
TanhSigmoid bool

Public Methods

Method Description
ComputeOutputs ( byte buffer, int size, int height, int width, OutputVector result ) : void
ComputeOutputs ( byte buffer, int size, int height, int width, int &outClasses, double &outEnergies, int &outSize ) : void
ComputeOutputsRaw ( byte buffer, int size, int height, int width, OutputVector result ) : void
ComputeOutputsRaw ( byte buffer, int size, int height, int width, int &outClasses, double &outEnergies, int &outSize ) : void
CreateLenet ( int nclasses, int classes, bool tanhSigmoid = false, bool netNorm = false, bool asciiTarget = true ) : int
DeleteLenet ( ) : void
LenetWrapper ( ) : System
LoadNetworkFromBuffer ( double buffer, int size ) : void
OnTrainRound ( object sender, TrainEventArgs args ) : void
SaveNetworkToBuffer ( int &size, double &darray ) : void
SetEmpty ( ) : void
TestDense ( IDataset ts ) : TrainInfo
TrainBatch ( IDataset ds, IDataset ts, int epochs ) : TrainInfo
TrainDense ( IDataset ds, int epochs ) : void

Private Methods

Method Description
AddSampleToTestOfEpoch ( IntPtr hrlenet, [ buffer, int size, int iclass ) : void
AddSampleToTrainOfEpoch ( IntPtr hrlenet, [ buffer, int size, int iclass ) : void
BeginTestEpoch ( IntPtr hrlenet, int height, int width, int testNsamples ) : void
BeginTrainEpoch ( IntPtr hrlenet, int height, int width, int trainNsamples, int testNsamples = -1 ) : void
ComputeOutputs ( IntPtr hrlenet, [ buffer, int size, int height, int width, [ outclasses, [ outenergies, int &outsize ) : void
ComputeOutputsRaw ( IntPtr hrlenet, [ buffer, int size, int height, int width, [ outclasses, [ outenergies, int &outsize ) : void
CreateLenet ( IntPtr &hrlenet, int nclasses, [ classes, bool tanhSigmoid, bool netNorm, bool asciiTarget ) : int
DeleteLenet ( IntPtr hrlenet ) : void
EndAndRunTestEpoch ( IntPtr hrlenet, TrainInfo &trainInfo ) : void
EndAndRunTrainEpoch ( IntPtr hrlenet, TrainInfo &trainInfo, int epochCount = 1 ) : void
GetStdout ( [ outstring ) : void
LoadNetwork ( IntPtr hrlenet, string networkFile ) : int
LoadNetworkFromBuffer ( IntPtr hrlenet, [ buffer, int size ) : void
LoadTestMnist ( IntPtr hrlenet, string testDatafile, string testLabelfile ) : int
LoadTrainMnist ( IntPtr hrlenet, string trainDatafile, string trainLabelfile ) : int
RecognizeImageFile ( IntPtr hrlenet, string imageFilename, int &answer, double &rate ) : void
RecognizeRawData ( IntPtr hrlenet, [ buffer, int size, int height, int width, int &answer, double &rate ) : void
SaveNetwork ( IntPtr hrlenet, string networkFile ) : int
SaveNetworkToBuffer ( IntPtr hrlenet, int &size, IntPtr &ppArray ) : void
SaveTrainMnist ( IntPtr hrlenet, string trainDatafile, string trainLabelfile ) : int
StartRedirectStdout ( ) : bool
TestDoubleCoTaskMemAlloc ( int &size, IntPtr &ppArray ) : void
TestIntCoTaskMemAlloc ( int &size, IntPtr &ppArray ) : void
TrainOneEpoch ( IntPtr hrlenet, TrainInfo &trainInfo ) : void

Method Details

ComputeOutputs() public method

public ComputeOutputs ( byte buffer, int size, int height, int width, OutputVector result ) : void
buffer byte
size int
height int
width int
result OutputVector
return void

ComputeOutputs() public method

public ComputeOutputs ( byte buffer, int size, int height, int width, int &outClasses, double &outEnergies, int &outSize ) : void
buffer byte
size int
height int
width int
outClasses int
outEnergies double
outSize int
return void

ComputeOutputsRaw() public method

public ComputeOutputsRaw ( byte buffer, int size, int height, int width, OutputVector result ) : void
buffer byte
size int
height int
width int
result OutputVector
return void

ComputeOutputsRaw() public method

public ComputeOutputsRaw ( byte buffer, int size, int height, int width, int &outClasses, double &outEnergies, int &outSize ) : void
buffer byte
size int
height int
width int
outClasses int
outEnergies double
outSize int
return void

CreateLenet() public method

public CreateLenet ( int nclasses, int classes, bool tanhSigmoid = false, bool netNorm = false, bool asciiTarget = true ) : int
nclasses int
classes int
tanhSigmoid bool
netNorm bool
asciiTarget bool
return int

DeleteLenet() public method

public DeleteLenet ( ) : void
return void

LenetWrapper() public method

public LenetWrapper ( ) : System
return System

LoadNetworkFromBuffer() public method

public LoadNetworkFromBuffer ( double buffer, int size ) : void
buffer double
size int
return void

OnTrainRound() public method

public OnTrainRound ( object sender, TrainEventArgs args ) : void
sender object
args TrainEventArgs
return void

SaveNetworkToBuffer() public method

public SaveNetworkToBuffer ( int &size, double &darray ) : void
size int
darray double
return void

SetEmpty() public method

public SetEmpty ( ) : void
return void

TestDense() public method

public TestDense ( IDataset ts ) : TrainInfo
ts Ocronet.Dynamic.IOData.IDataset
return TrainInfo

TrainBatch() public method

public TrainBatch ( IDataset ds, IDataset ts, int epochs ) : TrainInfo
ds Ocronet.Dynamic.IOData.IDataset
ts Ocronet.Dynamic.IOData.IDataset
epochs int
return TrainInfo

TrainDense() public method

public TrainDense ( IDataset ds, int epochs ) : void
ds Ocronet.Dynamic.IOData.IDataset
epochs int
return void

Property Details

AsciiTarget public property

public bool AsciiTarget
return bool

C2i public property

public Dictionary C2i
return int>.Dictionary

Classes public property

public int[] Classes
return int[]

HrLenet public property

public IntPtr,System HrLenet
return System.IntPtr

NetNorm public property

public bool NetNorm
return bool

TanhSigmoid public property

public bool TanhSigmoid
return bool