From d2c78df037bc197f6de57c4e2014f7e0df43fb7c Mon Sep 17 00:00:00 2001 From: akhandait Date: Thu, 10 Oct 2019 13:44:53 +0530 Subject: [PATCH] Fix failing tests. --- .../ann/layer/transposed_convolution_impl.hpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/mlpack/methods/ann/layer/transposed_convolution_impl.hpp b/src/mlpack/methods/ann/layer/transposed_convolution_impl.hpp index a487635736..4b216cff2b 100644 --- a/src/mlpack/methods/ann/layer/transposed_convolution_impl.hpp +++ b/src/mlpack/methods/ann/layer/transposed_convolution_impl.hpp @@ -78,15 +78,15 @@ TransposedConvolution< { weights.set_size((outSize * inSize * kW * kH) + outSize, 1); // TODO: Use the Padding layer. - // padding = new Padding<>(padW, padW, padH, padH); + // padding = new Padding<>(this->padW, this->padW, this->padH, this->padH); - aW = (outputWidth + kW - 2 * padW - 2) % dW; - aH = (outputHeight + kH - 2 * padH - 2) % dH; + aW = (outputWidth + kW - 2 * this->padW - 2) % dW; + aH = (outputHeight + kH - 2 * this->padH - 2) % dH; // Check if the output height and width are possible given the other // parameters of the layer. - if (outputWidth != dW * (inputWidth - 1) + aW + 2 * padW + 2 - kW || - outputHeight != dH * (inputHeight - 1) + aW + 2 * padH + 2 - kH) + if (outputWidth != dW * (inputWidth - 1) + aW + 2 * this->padW + 2 - kW || + outputHeight != dH * (inputHeight - 1) + aH + 2 * this->padH + 2 - kH) { Log::Fatal << "The output width / output height is not possible given " << "the other parameters of the layer." << std::endl; @@ -340,8 +340,6 @@ void TransposedConvolution< ar & BOOST_SERIALIZATION_NVP(inputHeight); ar & BOOST_SERIALIZATION_NVP(outputWidth); ar & BOOST_SERIALIZATION_NVP(outputHeight); - ar & BOOST_SERIALIZATION_NVP(aW); - ar & BOOST_SERIALIZATION_NVP(aH); if (Archive::is_loading::value) {