fix tf-cl program output format
@@ -340,7 +340,7 @@ Status GetTopLabels(const std::vector<Tensor>& outputs, int how_many_labels,
// Given the output of a model run, and the name of a file containing the labels
// this prints out the top five highest-scoring values.
Status PrintTopLabels(const std::vector<Tensor>& outputs,
- std::istream& labels_file, string label_file_name) {
+ std::istream& labels_file, string image_file_name) {
std::vector<string> labels;
size_t label_count;
Status read_labels_status =
@@ -356,7 +356,7 @@ Status PrintTopLabels(const std::vector<Tensor>& outputs,
tensorflow::TTypes<float>::Flat scores_flat = scores.flat<float>();
tensorflow::TTypes<int32>::Flat indices_flat = indices.flat<int32>();
- std::cout << "---------- Prediction for " << label_file_name << " ----------" << std::endl;
+ std::cout << "---------- Prediction for " << image_file_name << " ----------" << std::endl;
for (int pos = 0; pos < how_many_labels; ++pos) {
const int label_index = indices_flat(pos);
@@ -484,7 +484,7 @@ int main(int argc, char* argv[]) {
// Do something interesting with the results we've generated.
std::ifstream labels_file;
labels_file.open(labels, std::ifstream::in);
- Status print_status = PrintTopLabels(outputs, labels_file, labels);
+ Status print_status = PrintTopLabels(outputs, labels_file, image);
if (!print_status.ok()) {
LOG(ERROR) << "Running print failed: " << print_status;
return -1;
