regenerate the proto for support the dilation

mobile_baidu
xzl 8 years ago
parent 469b3ad589
commit fbd8a3307c

@ -81,8 +81,13 @@ void Convolution(const std::string& conv1,
for (size_t padding : {0, 1}) {
for (size_t dilation : {1, 3}) {
if (padding >= filterSize) break;
size_t filterS = (filterSize - 1) * dilation + 1;
if ((conv1 == "NaiveConv-CPU" || conv2 == "NaiveConv-CPU") &&
if (inputSize + 2 * padding < filterS) break;
if ((conv1 == "NaiveConv-CPU" || conv2 == "NaiveConv-CPU" ||
conv1 == "NNPACKConv-CPU" ||
conv2 == "NNPACKConv-CPU") &&
dilation > 1)
break;
@ -93,7 +98,7 @@ void Convolution(const std::string& conv1,
break;
size_t outputSize =
(inputSize - filterSize + 2 * padding + stride) / stride;
(inputSize - filterS + 2 * padding + stride) / stride;
VLOG(3) << " batchSize=" << batchSize
<< " inputChannels=" << inputChannels
<< " inputHeight=" << inputSize

@ -32,7 +32,8 @@ void TestIm2ColFunctor() {
for (size_t dilation : {1, 3}) {
size_t filterSizeH = (filterHeight - 1) * dilation + 1;
size_t filterSizeW = (filterWidth - 1) * dilation + 1;
if (inputHeight <= filterSizeH || inputWidth <= filterSizeW)
if (inputHeight + 2 * padding < filterSizeH ||
inputWidth + 2 * padding < filterSizeW)
break;
if (padding >= filterSizeH || padding >= filterSizeW) break;
size_t outputHeight =

@ -36,6 +36,8 @@ layers {
stride_y: 1
output_y: 14
img_size_y: 14
dilation: 1
dilation_y: 1
}
}
bias_parameter_name: "___conv_0__.wbias"

Loading…
Cancel
Save