C# Class Microsoft.MSR.CNTK.Extensibility.Managed.CSEvalClient.Program

Program for demonstrating how to run model evaluations using the CLIWrapper
Show file Open project: Microsoft/CNTK

Public Methods

Method Description
EvaluateImageInputUsingFeatureVector ( ) : List

This method shows how to evaluate a trained image classification model, with explicitly created feature vectors.

EvaluateImageInputUsingImageApi ( ) : List

This method shows how to evaluate a trained image classification model, where the creation of the CNTK feature vector is happening in native code inside the EvalWrapper.

Private Methods

Method Description
CompareImageApiResults ( List outputs1, List outputs2 ) : void
EvaluateExtendedNetworkSingleLayerNoInput ( ) : void

Evaluates an extended network (without a model and without input) and obtains a single layer output

EvaluateModelMultipleLayers ( ) : void

Evaluates a trained model and obtains multiple layers output (including hidden layer)

This example requires the 01_OneHidden trained model

EvaluateModelSingleLayer ( ) : void

Evaluates a trained model and obtains a single layer output

This example requires the 01_OneHidden trained model

EvaluateMultipleModels ( ) : void

Evaluates multiple instances of a model in the same process.

Although all models execute concurrently (multiple tasks), each model is evaluated with a single task at a time.

GetDictionary ( string key, int size, int maxValue ) : List>.Dictionary

Creates a Dictionary for input entries or output allocation

GetFloatArray ( int size, int maxValue ) : List

Creats a list of random numbers

Main ( string args ) : void

Program entry point

OnCNTKException ( CNTKException ex ) : void

Handle CNTK exceptions.

OnGeneralException ( Exception ex ) : void

Handle general exceptions.

OutputResults ( Dictionary outputs ) : void

Dumps the output to the console

OutputResults ( string layer, List values ) : void

Dumps the output of a layer to the console

ThrowIfFileNotExist ( string filePath, string errorMsg ) : void

Checks whether the file exists. If not, write the error message on the console and throw FileNotFoundException.

Method Details

EvaluateImageInputUsingFeatureVector() public static method

This method shows how to evaluate a trained image classification model, with explicitly created feature vectors.
public static EvaluateImageInputUsingFeatureVector ( ) : List
return List

EvaluateImageInputUsingImageApi() public static method

This method shows how to evaluate a trained image classification model, where the creation of the CNTK feature vector is happening in native code inside the EvalWrapper.
public static EvaluateImageInputUsingImageApi ( ) : List
return List