From d95b5cd59ee002d06a836d28c5150d931f60be9c Mon Sep 17 00:00:00 2001 From: liuqi Date: Fri, 16 Mar 2018 11:39:06 +0800 Subject: [PATCH] Remove unused code. --- mace/ops/fully_connected_benchmark.cc | 12 +++--------- mace/python/tools/caffe_converter_lib.py | 1 - tools/validate.py | 2 -- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/mace/ops/fully_connected_benchmark.cc b/mace/ops/fully_connected_benchmark.cc index c7f3dee4..5078b124 100644 --- a/mace/ops/fully_connected_benchmark.cc +++ b/mace/ops/fully_connected_benchmark.cc @@ -23,15 +23,9 @@ static void FCBenchmark( if (D == DeviceType::OPENCL) { const int width_size = height * width * channel; - kernels::BufferType weight_type = kernels::BufferType::WEIGHT_HEIGHT; -// if (width_size > 16384) { - BufferToImage(net, "Weight", "WeightImage", - kernels::BufferType::WEIGHT_WIDTH); - weight_type = kernels::BufferType::WEIGHT_WIDTH; -// } else { -// BufferToImage(net, "Weight", "WeightImage", -// kernels::BufferType::WEIGHT_HEIGHT); -// } + kernels::BufferType weight_type = kernels::BufferType::WEIGHT_WIDTH; + BufferToImage(net, "Weight", "WeightImage", + weight_type); BufferToImage(net, "Input", "InputImage", kernels::BufferType::IN_OUT_CHANNEL); BufferToImage(net, "Bias", "BiasImage", diff --git a/mace/python/tools/caffe_converter_lib.py b/mace/python/tools/caffe_converter_lib.py index c69297c0..5db1be84 100644 --- a/mace/python/tools/caffe_converter_lib.py +++ b/mace/python/tools/caffe_converter_lib.py @@ -422,7 +422,6 @@ class CaffeConverter(object): # Add filter weight_tensor_name = op.name + '_weight:0' self.add_tensor(weight_tensor_name, op.data[0]) - print 'Winograd filter shape:', op.data[0].shape buffer_type = "WINOGRAD_FILTER" filter_name = self.add_buffer_to_image(weight_tensor_name, buffer_type) diff --git a/tools/validate.py b/tools/validate.py index ed1c916c..4aaceacd 100644 --- a/tools/validate.py +++ b/tools/validate.py @@ -105,12 +105,10 @@ def validate_caffe_model(input_names, input_shapes, output_names, output_shapes) for i in range(len(output_names)): value = net.blobs[net.top_names[output_names[i]][0]].data[0] - print net.top_names[output_names[i]][0] out_shape = output_shapes[i] out_shape[1], out_shape[2], out_shape[3] = out_shape[3], out_shape[1], out_shape[2] value = value.reshape(out_shape).transpose((0, 2, 3, 1)) output_file_name = FLAGS.mace_out_file + "_" + format_output_name(output_names[i]) - print 'output file name:', output_file_name mace_out_value = load_data(output_file_name) compare_output(output_names[i], mace_out_value, value) -- GitLab