-
Notifications
You must be signed in to change notification settings - Fork 4.3k
CNTK Eval Examples
The CNTK binary download package also includes samples for using the eval library in C++, C#/.NET and Python. To download this package please see the CNTK Releases page.
The CNTKLibraryEvalExamples contains code samples demonstrating how to use the CNTK Library Eval API in C++ and C#.
-
CNTKLibraryCSEvalCPUOnlyExamples
uses the CNTK Library CPU-Only Nuget package to evaluate models on CPU-only devices in C#. -
CNTKLibraryCSEvalGPUExamples
uses the CNTK Library GPU Nuget package to evaluate models on GPU devices in C#. -
CNTKLibraryCPPEvalExamples
uses the CNTK Library C++ API to evaluate models on both CPU and GPU devices.
On Windows,
- You need Visual Studio 2015 update 3 for using these samples.
- The samples should be built for the 64-bit target platform and with the release configuration. Otherwise some issues arise when calling the library. Please also refer to the Troubleshoot CNTK page for more information.
- After a successful build, the executable is saved under the
$(SolutionDir)..\..$ (Platform)$(ProjectName).$(Configuration)\ folder, e.g. ..\..\X64\CNTKLibraryCSEvalCPUOnlyExamples.Release\CNTKLibraryCSEvalCPUOnlyExamples.exe. - For C++ examples, the required lib, CNTKLibrary-2.0.lib, should be located in
$(SolutionDir)..\..\cntk for building. In order to run the program, the directory containing CNTKLibrary-2.0.dll and other dependent dlls, usually the $ (SolutionDir)..\..\cntk, should be included in the search path of dlls for your application, e.g. as a part of the PATH environment variable.
On Linux, only C++ is supported. Please refer to Makefile for building samples. The target name CNTKLIBRARY_CPP_EVAL_EXAMPLES is used to build CNTKLibraryCPPEvalExamples.
The EvalClients.sln contains the following projects demonstrating how to use the CNTK EvalDLL in C++ and C#.
-
CPPEvalClient
: this sample uses the C++ EvalDLL. -
CPPEvalExtendedClient
: this sample uses the C++ extended Eval interface in EvalDLL to evalute a RNN model. -
CSEvalClient
: this sample uses the C# EvalDLL (only for Windows). It uses the CNTK EvalDll Nuget Package.
On Windows, The solution file EvalClients.sln is used to build and run samples. Please note
- You need Visual Studio 2015 update 3 for using these samples.
- The samples should be built for the 64-bit target platform and with the release configuration. Otherwise some issues arise when calling the library. Please also refer to the Troubleshoot CNTK page for more information.
- After a successful build, the executable is saved under the
$(SolutionDir)..\..$ (Platform)$(ProjectName).$(Configuration)\ folder, e.g. ..\..\X64\CPPEvalClient.Release\CppEvalClient.exe. - For C++ examples, the required lib, EvalDll.lib, should be located in
$(SolutionDir)..\..\cntk for building. In order to run the program, the directory containing EvalDll.dll and other dependent dlls, usually the $ (SolutionDir)..\..\cntk, should be included in the search path of dlls for your application, e.g. as a part of the PATH environment variable.
On Linux, please refer to Makefile for building samples. The target name EVAL_CLIENT, and EVAL_EXTENDED_CLIENT are used to build these projects.
You can also use Python to evaluate a pre-trained model as described here.