-
Notifications
You must be signed in to change notification settings - Fork 4.3k
CNTK Binary Download and Configuration
The Computational Network Toolkit (CNTK) supports both Windows and Linux 64bit platforms.
We only build release versions after milestones. We encourage users to enlist the source code to get most updated features and bug fixes, and to contribute back to the toolkit community.
Download the required binary package from CNTK Releases page and extract it to your machine.
You will find installation instructions in the Install-Windows.txt
file in the root folder of the archive.
For your convenience the same instructions are presented below at this page.
Ensure that the following prerequisites are installed on your system (you will find all required distribution packages, except for NVIDIA drivers in the prerequisites
folder of the archive; you may also use the links below):
- Visual C++ Redistributable Package for Visual Studio 2013
- Visual C++ Redistributable Package for Visual Studio 2012
-
Microsoft MPI of version 7 (7.0.12437.6). Note, that you need run-time (file
MSMpiSetup.exe
) and not SDK. Also note, that CNTK is currently tested with version 7 (7.0.12437.6). Using Version 7.1 may result in different compile and run-time errors - For GPU systems ensure that you have the latest NVIDIA driver
No further prerequisites are required, but you may want to get yourself familiar with Developer setup for CNTK on Windows
To ensure that CNTK is working properly in your system, you can quickly run Simple2d example from CNTK Examples set. This example trains a simple network and can be directed to use either CPU or GPU, which helps quickly ensure that CNTK is functioning properly:
The following assumes that you extracted the CNTK binaries into the directoriy c:\testcntk
. So the c:\testcntk directory will have subdirectories like Examples
and license
, and the directory c:\testcntk\cntk
will contain CNTK.EXE and the other requires CNTK executable files.
- Open Command Prompt
- Change into the directory c:\testcntk\Examples\other\simple2d\data and execute the sample from inside that directory with the command below
cd \testcntk\Examples\other\simple2d\data
\testcntk\cntk\CNTK.exe configfile=../config/Simple.cntk
If the sample runs, i.e. if there are no error messages, you will get an output related first to reading the configuration, followed by the output of the actual network training. Running the command a second time will report that the model has already been trained. To perform the training again, you have to specify the makeMode
option.
\testcntk\cntk\CNTK.exe configfile=../config/Simple.cntk makeMode=false
The binary package contains a lot of examples illustrating the usage of CNTK. See the corresponding Examples for details.
Under the Examples\Evaluation
folder there are some code samples demonstrating how to use the CNTK Evaluation library in C++ and C#. You need Visual Studio 2013 update 5 for using these samples.
The solution file EvalClients.sln
in this folder can be used to build and run samples. It contains two projects:
-
CPPEvalClient
: this is the sample for using the C++ eval library. It needs the EvalDll.lib library located in$(SolutionDir)..\..\cntk for building. The sample should be built for the 64-bit target platform and with the release configuration. After a successful build, the executable CPPEvalClient.exe is saved under the $ (SolutionDir)..\..$(Platform)\CPPEvalClient.$(Configuration)\ folder, e.g. ..\..\X64\CPPEvalClient.Release. In order to run the program, the directory containing EvalDll.dll and other dependent dlls, usually the $(SolutionDir)..\..\cntk, should be included in the PATH environment variable. -
CSEvalClient
: this is the sample for using the C# eval library. The sample uses the CNTK Evaluation Nuget Package and must be built for the 64-bit target. The executable CSEvalClient.exe is saved under the folder$(SolutionDir)..\..$ (Platform)\CSEvalClient.$(Configuration)\ folder, e.g. ..\..\X64\CSEvalClient.Release.
Currently, the CTNK evaluation library and the samples can only be used in CPU only mode. GPU support will be added in future.
If you want to use the CNTK evaluation library in your project, please follow the project settings in EvalClients.sln
to configure your own projects.
For Docker use, read the corresponding section. If you don't intend to utilize Docker, please continue reading.
Download the required binary package from CNTK Releases page and extract it to your machine.
You will find installation instructions in the Install-Linux.txt
file in the root folder of the archive.
For your convenience the same instructions are presented below at this page.
You need to install the following prerequisites:
- C++ Compiler
- Open MPI IMPORTANT! We strongly recommend to follow Open MPI installation procedure described by the link above to ensure the correct work of CNTK.
- For GPU systems ensure that you have the latest NVIDIA driver
After extracting the archive and installing prerequisites set the following environment variables (we assume that the CNTK archive is extracted to /home/username/cntk
):
export PATH=/home/username/cntk/cntk/bin:$PATH
export LD_LIBRARY_PATH=/home/username/cntk/cntk/lib:/home/username/cntk/cntk/dependencies/lib:$LD_LIBRARY_PATH
To quickly verify the correctness of installation use this procedure.