diff options
Diffstat (limited to 'tensorflow/examples/label_image/main.cc')
-rw-r--r-- | tensorflow/examples/label_image/main.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tensorflow/examples/label_image/main.cc b/tensorflow/examples/label_image/main.cc index c78ee33e06..9cff418c67 100644 --- a/tensorflow/examples/label_image/main.cc +++ b/tensorflow/examples/label_image/main.cc @@ -64,11 +64,13 @@ TF_DEFINE_string(image, "tensorflow/examples/label_image/data/grace_hopper.jpg", "The image to classify (JPEG or PNG)."); TF_DEFINE_string(graph, - "tensorflow/examples/label_image/data/googlenet_graph.pb", + "tensorflow/examples/label_image/data/" + "tensorflow_inception_graph.pb", "The location of the GraphDef file containing the protobuf" " definition of the network."); TF_DEFINE_string(labels, - "tensorflow/examples/label_image/data/googlenet_labels.txt", + "tensorflow/examples/label_image/data/" + "imagenet_comp_graph_label_strings.txt", "A text file containing the labels of all the categories, one" " per line."); TF_DEFINE_int32(input_width, 224, "Width of the image the network expects."); @@ -85,6 +87,10 @@ TF_DEFINE_string(root_dir, "", "The directory at the root of the data files."); // of the result is a multiple of 16, because our model expects that. Status ReadLabelsFile(string file_name, std::vector<string>* result) { std::ifstream file(file_name); + if (!file) { + return tensorflow::errors::NotFound("Labels file ", file_name, + " not found."); + } result->clear(); string line; while (std::getline(file, line)) { |