diff options
Diffstat (limited to 'binaries')
-rw-r--r-- | binaries/benchmark_helper.cc | 6 | ||||
-rw-r--r-- | binaries/speed_benchmark.cc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/binaries/benchmark_helper.cc b/binaries/benchmark_helper.cc index 001c8e965f..f481a6292c 100644 --- a/binaries/benchmark_helper.cc +++ b/binaries/benchmark_helper.cc @@ -163,7 +163,7 @@ void loadInput( CAFFE_THROW("Not support GPU on mobile."); #endif } else { - caffe2::TensorCPU* tensor = blob->GetMutableTensor(caffe2::CPU); + caffe2::TensorCPU* tensor = BlobGetMutableTensor(blob, caffe2::CPU); CHECK_NOTNULL(tensor); tensor->Resize(input_dims); if (input_type_list[i] == "uint8_t") { @@ -200,7 +200,7 @@ void fillInputBlob( int protos_size = tensor_kv.second.protos_size(); caffe2::TensorProto* tensor_proto = tensor_kv.second.mutable_protos(iteration % protos_size); - caffe2::TensorCPU* tensor = blob->GetMutableTensor(caffe2::CPU); + caffe2::TensorCPU* tensor = BlobGetMutableTensor(blob, caffe2::CPU); if (tensor_proto->data_type() == caffe2::TensorProto::STRING) { int total_size = tensor_proto->string_data_size(); for (size_t i = 0; i < total_size; i++) { @@ -298,7 +298,7 @@ void writeOutput( #endif } else { writeTextOutput<caffe2::CPUContext, caffe2::TensorCPU>( - workspace->GetBlob(name)->GetMutableTensor(caffe2::CPU), + BlobGetMutableTensor(workspace->GetBlob(name), caffe2::CPU), output_prefix, name); } diff --git a/binaries/speed_benchmark.cc b/binaries/speed_benchmark.cc index 5914e3f58b..fd502cf3c0 100644 --- a/binaries/speed_benchmark.cc +++ b/binaries/speed_benchmark.cc @@ -137,7 +137,7 @@ int main(int argc, char** argv) { if (blob == nullptr) { blob = workspace->CreateBlob(input_names[i]); } - caffe2::TensorCPU* tensor = blob->GetMutableTensor(caffe2::CPU); + caffe2::TensorCPU* tensor = BlobGetMutableTensor(blob, caffe2::CPU); CHECK_NOTNULL(tensor); tensor->Resize(input_dims); if (input_type_list[i] == "uint8_t") { |