Skip to content

Commit

Permalink
change double quote to single quote
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouwangzw committed Sep 2, 2016
1 parent 0f481b4 commit ab364ae
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Examples/Evaluation/CSEvalClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private static void ThrowIfFileNotExist(string filePath, string errorMsg)
{
Console.WriteLine(errorMsg);
}
throw new FileNotFoundException(string.Format("File \"{0}\" not found.", filePath));
throw new FileNotFoundException(string.Format("File '{0}' not found.", filePath));
}
}

Expand All @@ -128,9 +128,9 @@ private static void EvaluateModelSingleLayer()
// Load model
string modelFilePath = Path.Combine(Environment.CurrentDirectory, @"..\Output\Models\01_OneHidden");
ThrowIfFileNotExist(modelFilePath,
string.Format("Error: The model \"{0}\" does not exist. Please follow instructions in README.md in <CNTK>/Examples/Image/MNIST to create the model.", modelFilePath));
string.Format("Error: The model '{0}' does not exist. Please follow instructions in README.md in <CNTK>/Examples/Image/MNIST to create the model.", modelFilePath));

model.CreateNetwork(string.Format("modelPath=\"{0}\"", modelFilePath), deviceId: -1);
model.CreateNetwork(string.Format("modelPath='{0}'", modelFilePath), deviceId: -1);

// Generate random input values in the appropriate structure and size
var inDims = model.GetNodeDimensions(NodeGroup.Input);
Expand Down Expand Up @@ -180,10 +180,10 @@ private static void EvaluateModelMultipleLayers()
// Load model
string modelFilePath = Path.Combine(Environment.CurrentDirectory, @"..\Output\Models\01_OneHidden");
ThrowIfFileNotExist(modelFilePath,
string.Format("Error: The model \"{0}\" does not exist. Please follow instructions in README.md in <CNTK>/Examples/Image/MNIST to create the model.", modelFilePath));
string.Format("Error: The model '{0}' does not exist. Please follow instructions in README.md in <CNTK>/Examples/Image/MNIST to create the model.", modelFilePath));

var desiredOutputLayers = new List<string>() { hiddenLayerName, outputLayerName };
model.CreateNetwork(string.Format("modelPath=\"{0}\"", modelFilePath), deviceId: -1, outputNodeNames: desiredOutputLayers);
model.CreateNetwork(string.Format("modelPath='{0}'", modelFilePath), deviceId: -1, outputNodeNames: desiredOutputLayers);

// Generate random input values in the appropriate structure and size
var inDims = model.GetNodeDimensions(NodeGroup.Input);
Expand Down Expand Up @@ -234,7 +234,7 @@ private static void EvaluateNetworkSingleLayer()
// This network (AddOperatorConstant_ndl_deprecated.cntk) is a simple network consisting of a single binary operator (Plus)
// operating over a single input and a constant
string networkFilePath = Path.Combine(workingDirectory, @"AddOperatorConstant_ndl_deprecated.cntk");
ThrowIfFileNotExist(networkFilePath, string.Format("Error: The network configuration file \"{0}\" does not exist.", networkFilePath));
ThrowIfFileNotExist(networkFilePath, string.Format("Error: The network configuration file '{0}' does not exist.", networkFilePath));

string networkDescription = File.ReadAllText(networkFilePath);
model.CreateNetwork(networkDescription, deviceId: -1);
Expand Down Expand Up @@ -280,7 +280,7 @@ private static void EvaluateNetworkSingleLayerNoInput()
// This network (AddOperatorConstantNoInput_ndl_deprecated.cntk) is a simple network consisting of a single binary operator (Plus)
// operating over a two constants, therefore no input is necessary.
string networkFilePath = Path.Combine(workingDirectory, @"AddOperatorConstantNoInput_ndl_deprecated.cntk");
ThrowIfFileNotExist(networkFilePath, string.Format("Error: The network configuration file \"{0}\" does not exist.", networkFilePath));
ThrowIfFileNotExist(networkFilePath, string.Format("Error: The network configuration file '{0}' does not exist.", networkFilePath));

string networkDescription = File.ReadAllText(networkFilePath);
model.CreateNetwork(networkDescription, deviceId: -1);
Expand Down Expand Up @@ -378,14 +378,14 @@ private static void EvaluateMultipleModels()
// Load model
string modelFilePath = Path.Combine(Environment.CurrentDirectory, @"..\Output\Models\02_Convolution");
ThrowIfFileNotExist(modelFilePath,
string.Format("Error: The model \"{0}\" does not exist. Please follow instructions in README.md in <CNTK>/Examples/Image/MNIST to create the model.", modelFilePath));
string.Format("Error: The model '{0}' does not exist. Please follow instructions in README.md in <CNTK>/Examples/Image/MNIST to create the model.", modelFilePath));

// Initializes the model instances
ModelEvaluator.Initialize(numConcurrentModels, modelFilePath);

string testfile = Path.Combine(Environment.CurrentDirectory, @"Test-28x28_cntk_text.txt");
ThrowIfFileNotExist(testfile,
string.Format("Error: The test file \"{0}\" does not exist. Please follow instructions in README.md in <CNTK>/Examples/Image/MNIST to download the data.", testfile));
string.Format("Error: The test file '{0}' does not exist. Please follow instructions in README.md in <CNTK>/Examples/Image/MNIST to download the data.", testfile));

Stopwatch sw = new Stopwatch();
sw.Start();
Expand Down Expand Up @@ -464,9 +464,9 @@ public static void EvaluateImageClassificationModel()
{
string modelFilePath = Path.Combine(workingDirectory, "ResNet_18.model");
ThrowIfFileNotExist(modelFilePath,
string.Format("Error: The model \"{0}\" does not exist. Please download the model from https://www.cntk.ai/resnet/ResNet_18.model and save it under ..\\..\\Examples\\Image\\Miscellaneous\\ImageNet\\ResNet.", modelFilePath));
string.Format("Error: The model '{0}' does not exist. Please download the model from https://www.cntk.ai/resnet/ResNet_18.model and save it under ..\\..\\Examples\\Image\\Miscellaneous\\ImageNet\\ResNet.", modelFilePath));

model.CreateNetwork(string.Format("modelPath=\"{0}\"", modelFilePath), deviceId: -1);
model.CreateNetwork(string.Format("modelPath='{0}'", modelFilePath), deviceId: -1);

// Prepare input value in the appropriate structure and size
var inDims = model.GetNodeDimensions(NodeGroup.Input);
Expand All @@ -477,7 +477,7 @@ public static void EvaluateImageClassificationModel()

// Transform the image
string imageFileName = Path.Combine(workingDirectory, "zebra.jpg");
ThrowIfFileNotExist(imageFileName, string.Format("Error: The test image file \"{0}\" does not exist.", imageFileName));
ThrowIfFileNotExist(imageFileName, string.Format("Error: The test image file '{0}' does not exist.", imageFileName));

Bitmap bmp = new Bitmap(Bitmap.FromFile(imageFileName));

Expand Down

0 comments on commit ab364ae

Please sign in to comment.