diff --git a/CNTK.sln b/CNTK.sln index 2c855ea47b12..05bb002a0e16 100644 --- a/CNTK.sln +++ b/CNTK.sln @@ -1141,9 +1141,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManagedEvalTests", "Tests\U EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Evaluation", "Evaluation", "{3385EBEA-5F97-4B2B-9F30-0E6D7F91B9CA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSEvalClient-FromCntkSln", "Examples\Evaluation\CSEvalClient-FromCntkSln\CSEvalClient-FromCntkSln.csproj", "{1C6E6C53-1AA7-4B69-913E-B97BB5A872CF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSEvalClient-CntkSln", "Examples\Evaluation\CSEvalClient-CntkSln\CSEvalClient-CntkSln.csproj", "{1C6E6C53-1AA7-4B69-913E-B97BB5A872CF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CPPEvalClient-FromCntkSln", "Examples\Evaluation\CPPEvalClient-FromCntkSln\CPPEvalClient-FromCntkSln.vcxproj", "{CCC07E8E-F33A-4AF7-9F60-93E2AA61C75E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CPPEvalClient-CntkSln", "Examples\Evaluation\CPPEvalClient-CntkSln\CPPEvalClient-CntkSln.vcxproj", "{CCC07E8E-F33A-4AF7-9F60-93E2AA61C75E}" ProjectSection(ProjectDependencies) = postProject {482999D1-B7E2-466E-9F8D-2119F93EAFD9} = {482999D1-B7E2-466E-9F8D-2119F93EAFD9} EndProjectSection diff --git a/Examples/Evaluation/CPPEvalClient-FromCntkSln/CPPEvalClient-FromCntkSln.vcxproj b/Examples/Evaluation/CPPEvalClient-CntkSln/CPPEvalClient-CntkSln.vcxproj similarity index 96% rename from Examples/Evaluation/CPPEvalClient-FromCntkSln/CPPEvalClient-FromCntkSln.vcxproj rename to Examples/Evaluation/CPPEvalClient-CntkSln/CPPEvalClient-CntkSln.vcxproj index 4be38c3cb89a..c686a31e1a06 100644 --- a/Examples/Evaluation/CPPEvalClient-FromCntkSln/CPPEvalClient-FromCntkSln.vcxproj +++ b/Examples/Evaluation/CPPEvalClient-CntkSln/CPPEvalClient-CntkSln.vcxproj @@ -21,8 +21,8 @@ {CCC07E8E-F33A-4AF7-9F60-93E2AA61C75E} Win32Proj - CPPEvalClient-FromCntkSln - CPPEvalClient-FromCntkSln + CPPEvalClient-CntkSln + CPPEvalClient-CntkSln @@ -52,7 +52,7 @@ false - CPPEvalClient-FromCntkSln + CPPEvalClient-CntkSln diff --git a/Examples/Evaluation/CPPEvalClient-FromCntkSln/CPPEvalClient-FromCntkSln.vcxproj.filters b/Examples/Evaluation/CPPEvalClient-CntkSln/CPPEvalClient-CntkSln.vcxproj.filters similarity index 100% rename from Examples/Evaluation/CPPEvalClient-FromCntkSln/CPPEvalClient-FromCntkSln.vcxproj.filters rename to Examples/Evaluation/CPPEvalClient-CntkSln/CPPEvalClient-CntkSln.vcxproj.filters diff --git a/Examples/Evaluation/CPPEvalClient-CntkSln/README.md b/Examples/Evaluation/CPPEvalClient-CntkSln/README.md new file mode 100644 index 000000000000..0026bad6deb9 --- /dev/null +++ b/Examples/Evaluation/CPPEvalClient-CntkSln/README.md @@ -0,0 +1 @@ +This folder contains the VC++ project file used by cntk.sln to build CPPEvalClient.exe. The C++ source code used by the project is available in ..\CPPEvalClient. \ No newline at end of file diff --git a/Examples/Evaluation/CPPEvalClient/CPPEvalClient.cpp b/Examples/Evaluation/CPPEvalClient/CPPEvalClient.cpp index 60b1442d0c57..737e41976b27 100644 --- a/Examples/Evaluation/CPPEvalClient/CPPEvalClient.cpp +++ b/Examples/Evaluation/CPPEvalClient/CPPEvalClient.cpp @@ -58,8 +58,8 @@ int main(int argc, char* argv[]) struct stat statBuf; if (stat(modelFilePath.c_str(), &statBuf) != 0) { - printf("Error: The model %s does not exist. Please run the example in /Examples/Image/MNIST to create the model.\n", modelFilePath.c_str()); - exit(1); + fprintf(stderr, "Error: The model %s does not exist. Please follow instructions in README.md in /Examples/Image/MNIST to create the model.\n", modelFilePath.c_str()); + return(1); } GetEvalF(&model); diff --git a/Examples/Evaluation/CPPEvalClient/README.md b/Examples/Evaluation/CPPEvalClient/README.md deleted file mode 100644 index ea296c701de7..000000000000 --- a/Examples/Evaluation/CPPEvalClient/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Eval Client -This folder contains the VC++ project file to build CPPEvalClient. -This project creates CPPEvalClient.exe in the directory $(SolutionDir)..\..\x64\CPPEvalClient.Release. The CPPEvalClient only supports 64-bit target and release configuration. -Before start the example, please make sure that the directory containing CNTK dependent dlls, usually $(SolutionDir)..\..\cntk\, is specified as a part of the PATH environment variable. diff --git a/Examples/Evaluation/CSEvalClient-FromCntkSln/App.config b/Examples/Evaluation/CSEvalClient-CntkSln/App.config similarity index 100% rename from Examples/Evaluation/CSEvalClient-FromCntkSln/App.config rename to Examples/Evaluation/CSEvalClient-CntkSln/App.config diff --git a/Examples/Evaluation/CSEvalClient-FromCntkSln/CSEvalClient-FromCntkSln.csproj b/Examples/Evaluation/CSEvalClient-CntkSln/CSEvalClient-CntkSln.csproj similarity index 97% rename from Examples/Evaluation/CSEvalClient-FromCntkSln/CSEvalClient-FromCntkSln.csproj rename to Examples/Evaluation/CSEvalClient-CntkSln/CSEvalClient-CntkSln.csproj index 01ed4c9c4688..c09c73c645de 100644 --- a/Examples/Evaluation/CSEvalClient-FromCntkSln/CSEvalClient-FromCntkSln.csproj +++ b/Examples/Evaluation/CSEvalClient-CntkSln/CSEvalClient-CntkSln.csproj @@ -7,8 +7,8 @@ {1C6E6C53-1AA7-4B69-913E-B97BB5A872CF} Exe Properties - Microsoft.MSR.CNTK.Extensibility.Managed.CSEvalClientFromCntkSln - CSEvalClient-FromCntkSln + Microsoft.MSR.CNTK.Extensibility.Managed.CSEvalClientCntkSln + CSEvalClient-CntkSln v4.5 512 diff --git a/Examples/Evaluation/CSEvalClient-FromCntkSln/Properties/AssemblyInfo.cs b/Examples/Evaluation/CSEvalClient-CntkSln/Properties/AssemblyInfo.cs similarity index 100% rename from Examples/Evaluation/CSEvalClient-FromCntkSln/Properties/AssemblyInfo.cs rename to Examples/Evaluation/CSEvalClient-CntkSln/Properties/AssemblyInfo.cs diff --git a/Examples/Evaluation/CSEvalClient-CntkSln/README.md b/Examples/Evaluation/CSEvalClient-CntkSln/README.md new file mode 100644 index 000000000000..ea5f65464cb4 --- /dev/null +++ b/Examples/Evaluation/CSEvalClient-CntkSln/README.md @@ -0,0 +1 @@ +This folder contains the C# project file used by cntk.sln to build CSEvalClient.exe. The C# source code used by the project is available in ..\CSEvalClient. \ No newline at end of file diff --git a/Examples/Evaluation/CSEvalClient/Program.cs b/Examples/Evaluation/CSEvalClient/Program.cs index c8c7bb39cb48..d2850d5ea63d 100644 --- a/Examples/Evaluation/CSEvalClient/Program.cs +++ b/Examples/Evaluation/CSEvalClient/Program.cs @@ -112,7 +112,7 @@ private static void EvaluateModelSingleLayer() string modelFilePath = Path.Combine(Environment.CurrentDirectory, @"..\Output\Models\01_OneHidden"); if (!File.Exists(modelFilePath)) { - Console.WriteLine("Error: The model {0} does not exist. Please run the example in /Examples/Image/MNIST to create the model.", modelFilePath); + Console.WriteLine("Error: The model {0} does not exist. Please follow instructions in README.md in /Examples/Image/MNIST to create the model.", modelFilePath); throw new FileNotFoundException(string.Format("File {0} not found.", modelFilePath)); } @@ -167,7 +167,7 @@ private static void EvaluateModelMultipleLayers() string modelFilePath = Path.Combine(Environment.CurrentDirectory, @"..\Output\Models\01_OneHidden"); if (!File.Exists(modelFilePath)) { - Console.WriteLine("Error: The model {0} does not exist. Please run the example in /Examples/Image/MNIST to create the model.", modelFilePath); + Console.WriteLine("Error: The model {0} does not exist. Please follow instructions in README.md in /Examples/Image/MNIST to create the model.", modelFilePath); throw new FileNotFoundException(string.Format("File {0} not found.", modelFilePath)); } @@ -379,7 +379,7 @@ private static void EvaluateMultipleModels() string modelFilePath = Path.Combine(Environment.CurrentDirectory, @"..\Output\Models\02_Convolution"); if (!File.Exists(modelFilePath)) { - Console.WriteLine("Error: The model {0} does not exist. Please run the example in /Examples/Image/MNIST to create the model.", modelFilePath); + Console.WriteLine("Error: The model {0} does not exist. Please follow instructions in README.md in /Examples/Image/MNIST to create the model.", modelFilePath); throw new FileNotFoundException(string.Format("File {0} not found.", modelFilePath)); } @@ -389,7 +389,7 @@ private static void EvaluateMultipleModels() string testfile = Path.Combine(Environment.CurrentDirectory, @"Test-28x28_cntk_text.txt"); if (!File.Exists(testfile)) { - Console.WriteLine("Error: The test file {0} does not exist. Please read README.md in /Examples/Image/MNIST to download the data file", testfile); + Console.WriteLine("Error: The test file {0} does not exist. Please follow instructions in README.md in /Examples/Image/MNIST to download the data.", testfile); throw new FileNotFoundException(string.Format("File {0} not found.", testfile)); } diff --git a/Examples/Evaluation/CSEvalClient/README.md b/Examples/Evaluation/CSEvalClient/README.md deleted file mode 100644 index 97d7c3d3af1a..000000000000 --- a/Examples/Evaluation/CSEvalClient/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This folder contains the C# project file to build CSEvalClient. -This project creates CSEvalClient.exe in the directory $(SolutionDir)..\..\x64\CSEvalClient.$(Configuration)\. Please note that only 64-bit target is supported. diff --git a/Examples/Evaluation/README.md b/Examples/Evaluation/README.md index a21107952038..2548f8ad9244 100644 --- a/Examples/Evaluation/README.md +++ b/Examples/Evaluation/README.md @@ -1,8 +1,8 @@ #EvalClients -Thefolder contains examples using the CNTK evaluation library. Please note that only 64-bit target is supported by CNTK evaluation library. --CPPEvalClient:it is C++ example code and VS C++ project file --CSEvalClient:it is C# example code and VS C# project file --EvalClients.sln:the VS solution file to build examples in the CNTK binary download package. It creates 2 binaries in the directory $(SolutionDir)..\..\x64\: -*CPPEvalClient.$(Configuration)\CPPEvalClient.exe: the C++ example executable. Only the release configuraiton is supported by the CNTK binary download. To start the example, please first include the directory containing CNTK dependent dlls, usually $(SolutionDir)..\..\cntk, in the PATH environment variable. -*CSEvalClient.$(Configuration)\CSEvalClient.exe: the C# example executable. +The folder contains some examples using the CNTK evaluation library. Please note that only 64-bit target is supported by CNTK evaluation library. +-CPPEvalClient: demonstrate the use of C++ CNTK eval lib. Only the release configuration is supported. +-CSEvalClient: demonstrate the use of C# CNTK eval lib. +-EvalClients.sln: the VS2013 solution file to build examples. It creates two binaries in the directory $(SolutionDir)..\..\x64\: + * CPPEvalClient.$(Configuration)\CPPEvalClient.exe: the C++ example executable. To run the example, please first include the directory containing CNTK dependent dlls, usually $(SolutionDir)..\..\cntk, in the PATH environment variable. + * CSEvalClient.$(Configuration)\CSEvalClient.exe: the C# example executable. diff --git a/Tools/make_binary_drop_windows.ps1 b/Tools/make_binary_drop_windows.ps1 index 9aabcbeb845d..451e014b9af1 100644 --- a/Tools/make_binary_drop_windows.ps1 +++ b/Tools/make_binary_drop_windows.ps1 @@ -111,9 +111,15 @@ Copy-Item $includeFile -Destination $baseIncludePath # Copy Examples Write-Verbose "Copying Examples ..." Copy-Item Examples -Recurse -Destination $baseDropPath\Examples -# Remove directories for CNTK.sln-only use: -Remove-Item $baseDropPath\Examples\Evaluation\CPPEvalClient-FromCntkSln -Remove-Item $baseDropPath\Examples\Evaluation\CSEvalClient-FromCntkSln +# The following directories are only used by cntk.sln and should be included in the binary drop. Remove them. +if (Test-Path $baseDropPath\Examples\Evaluation\CPPEvalClient-CntkSln) +{ + Remove-Item $baseDropPath\Examples\Evaluation\CPPEvalClient-CntkSln +} +if (Test-Path $baseDropPath\Examples\Evaluation\CSEvalClient-CntkSln) +{ + Remove-Item $baseDropPath\Examples\Evaluation\CSEvalClient-CntkSln +} # Copy Scripts Write-Verbose "Copying Scripts ..."