Skip to content

Commit

Permalink
fix tensor_info
Browse files Browse the repository at this point in the history
  • Loading branch information
Neargye committed Dec 21, 2018
1 parent 1e63b04 commit 99295fe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/tensor_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ void PrintOutputs(TF_Graph* graph, TF_Operation* op) {
continue;
}

std::cout << " dims: " << num_dims;

if (num_dims <= 0) {
std::cout << " []" << std::endl;;
continue;
}

std::vector<std::int64_t> dims(num_dims);

std::cout << "Output: " << i << " type: " << TFDataTypeToString(type);
Expand All @@ -111,7 +118,7 @@ void PrintOutputs(TF_Graph* graph, TF_Operation* op) {
continue;
}

std::cout << " dims: " << num_dims << " [";
std::cout << " [";
for (int d = 0; d < num_dims; ++d) {
std::cout << dims[d];
if (d < num_dims - 1) {
Expand Down

0 comments on commit 99295fe

Please sign in to comment.