Support int64 in benchmark, and tensors without shape in visualize tool.

PiperOrigin-RevId: 260792671
This commit is contained in:
A. Unique TensorFlower 2019-07-30 14:14:41 -07:00 committed by TensorFlower Gardener
parent e207706514
commit e1fbef7dd2
2 changed files with 4 additions and 1 deletions

View File

@ -377,6 +377,9 @@ void BenchmarkTfLiteModel::ResetInputsAndOutputs() {
if (t->type == kTfLiteFloat32) {
std::memcpy(interpreter_->typed_tensor<float>(i), inputs_data_[j].data.f,
inputs_data_[j].bytes);
} else if (t->type == kTfLiteInt64) {
std::memcpy(interpreter_->typed_tensor<int64_t>(i),
inputs_data_[j].data.i64, inputs_data_[j].bytes);
} else if (t->type == kTfLiteInt32) {
std::memcpy(interpreter_->typed_tensor<int32_t>(i),
inputs_data_[j].data.i32, inputs_data_[j].bytes);

View File

@ -313,7 +313,7 @@ def GenerateGraph(subgraph_idx, g, opcode_mapper):
nodes.append({
"id": TensorName(tensor_index),
"name": "%r (%d)" % (tensor["shape"], tensor_index),
"name": "%r (%d)" % (getattr(tensor, "shape", []), tensor_index),
"group": 1,
"x": initial_y[1],
"y": initial_y[0]