Support int64 in benchmark, and tensors without shape in visualize tool.
PiperOrigin-RevId: 260792671
This commit is contained in:
parent
e207706514
commit
e1fbef7dd2
@ -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);
|
||||
|
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user