提交 d95b5cd5 编写于 作者: L liuqi

Remove unused code.

上级 0c3967d6
...@@ -23,15 +23,9 @@ static void FCBenchmark( ...@@ -23,15 +23,9 @@ static void FCBenchmark(
if (D == DeviceType::OPENCL) { if (D == DeviceType::OPENCL) {
const int width_size = height * width * channel; const int width_size = height * width * channel;
kernels::BufferType weight_type = kernels::BufferType::WEIGHT_HEIGHT; kernels::BufferType weight_type = kernels::BufferType::WEIGHT_WIDTH;
// if (width_size > 16384) { BufferToImage<D, T>(net, "Weight", "WeightImage",
BufferToImage<D, T>(net, "Weight", "WeightImage", weight_type);
kernels::BufferType::WEIGHT_WIDTH);
weight_type = kernels::BufferType::WEIGHT_WIDTH;
// } else {
// BufferToImage<D, T>(net, "Weight", "WeightImage",
// kernels::BufferType::WEIGHT_HEIGHT);
// }
BufferToImage<D, T>(net, "Input", "InputImage", BufferToImage<D, T>(net, "Input", "InputImage",
kernels::BufferType::IN_OUT_CHANNEL); kernels::BufferType::IN_OUT_CHANNEL);
BufferToImage<D, T>(net, "Bias", "BiasImage", BufferToImage<D, T>(net, "Bias", "BiasImage",
......
...@@ -422,7 +422,6 @@ class CaffeConverter(object): ...@@ -422,7 +422,6 @@ class CaffeConverter(object):
# Add filter # Add filter
weight_tensor_name = op.name + '_weight:0' weight_tensor_name = op.name + '_weight:0'
self.add_tensor(weight_tensor_name, op.data[0]) self.add_tensor(weight_tensor_name, op.data[0])
print 'Winograd filter shape:', op.data[0].shape
buffer_type = "WINOGRAD_FILTER" buffer_type = "WINOGRAD_FILTER"
filter_name = self.add_buffer_to_image(weight_tensor_name, buffer_type) filter_name = self.add_buffer_to_image(weight_tensor_name, buffer_type)
......
...@@ -105,12 +105,10 @@ def validate_caffe_model(input_names, input_shapes, output_names, output_shapes) ...@@ -105,12 +105,10 @@ def validate_caffe_model(input_names, input_shapes, output_names, output_shapes)
for i in range(len(output_names)): for i in range(len(output_names)):
value = net.blobs[net.top_names[output_names[i]][0]].data[0] 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 = output_shapes[i]
out_shape[1], out_shape[2], out_shape[3] = out_shape[3], out_shape[1], out_shape[2] 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)) value = value.reshape(out_shape).transpose((0, 2, 3, 1))
output_file_name = FLAGS.mace_out_file + "_" + format_output_name(output_names[i]) 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) mace_out_value = load_data(output_file_name)
compare_output(output_names[i], mace_out_value, value) compare_output(output_names[i], mace_out_value, value)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册