diff --git a/src/mlpack/core/util/arma_traits.hpp b/src/mlpack/core/util/arma_traits.hpp index 8b8f8a8b48..479fa1d7f4 100644 --- a/src/mlpack/core/util/arma_traits.hpp +++ b/src/mlpack/core/util/arma_traits.hpp @@ -164,12 +164,9 @@ struct GetColType }; template -struct GetUIntColType +struct GetUColType { - typedef typename MatType::elem_type eT; - typedef typename std::conditional< - std::is_same::value, eT, arma::uword>::type elem; - typedef arma::Col type; + typedef arma::Col type; }; template @@ -221,12 +218,9 @@ struct GetDenseMatType }; template -struct GetUIntDenseMatType +struct GetUDenseMatType { - typedef typename MatType::elem_type eT; - typedef typename std::conditional< - std::is_same::value, eT, arma::uword>::type elem; - typedef arma::Mat type; + typedef arma::Mat type; }; template diff --git a/src/mlpack/methods/ann/layer/repeat.hpp b/src/mlpack/methods/ann/layer/repeat.hpp index fcb9436bbf..bd0896b6c8 100644 --- a/src/mlpack/methods/ann/layer/repeat.hpp +++ b/src/mlpack/methods/ann/layer/repeat.hpp @@ -34,8 +34,8 @@ class RepeatType : public Layer { public: //! Get Specific Col type, not only arma - typedef typename GetUIntColType::type UintCol; - typedef typename GetUIntDenseMatType::type UintMat; + typedef typename GetUColType::type UintCol; + typedef typename GetUDenseMatType::type UintMat; /** * Create the Repeat object. Multiples will be empty (e.g. 1s for all * dimensions), so this is the equivalent of an Identity Layer. diff --git a/src/mlpack/methods/ann/layer/repeat_impl.hpp b/src/mlpack/methods/ann/layer/repeat_impl.hpp index a1723e52f3..0f8fee099c 100644 --- a/src/mlpack/methods/ann/layer/repeat_impl.hpp +++ b/src/mlpack/methods/ann/layer/repeat_impl.hpp @@ -159,7 +159,7 @@ void RepeatType::ComputeOutputDimensions() UintCol counts(inputSize, arma::fill::zeros); for (size_t i = 0; i < outIdxs.n_elem; i++) { - auto r = outIdxs.at(i); + arma::uword r = outIdxs.at(i); backIdxs.at(r, counts.at(r)++) = i; } }