diff --git a/src/mlpack/core/data/load_image_impl.hpp b/src/mlpack/core/data/load_image_impl.hpp index e4fa8230af..7c2da5db3e 100644 --- a/src/mlpack/core/data/load_image_impl.hpp +++ b/src/mlpack/core/data/load_image_impl.hpp @@ -27,7 +27,7 @@ template bool Load(const std::string& filename, arma::Mat& matrix, ImageInfo& info, - const bool fatal, + const bool /* fatal */, const bool transpose) { Timer::Start("loading_image"); diff --git a/src/mlpack/methods/preprocess/scaling_model_impl.hpp b/src/mlpack/methods/preprocess/scaling_model_impl.hpp index 20791c55bd..de9a94c0e6 100644 --- a/src/mlpack/methods/preprocess/scaling_model_impl.hpp +++ b/src/mlpack/methods/preprocess/scaling_model_impl.hpp @@ -19,8 +19,9 @@ namespace mlpack { namespace data { -ScalingModel::ScalingModel(const int minvalue, const int maxvalue, - double epsilonvalue) : +ScalingModel::ScalingModel(const int minvalue, + const int maxvalue, + double epsilonvalue) : scalerType(0), minmaxscale(NULL), maxabsscale(NULL), @@ -37,22 +38,22 @@ ScalingModel::ScalingModel(const int minvalue, const int maxvalue, //! Copy constructor. ScalingModel::ScalingModel(const ScalingModel& other) : - minValue(other.minValue), scalerType(other.scalerType), - maxValue(other.maxValue), - epsilon(other.epsilon), minmaxscale(other.minmaxscale == NULL ? NULL : new data::MinMaxScaler(*other.minmaxscale)), maxabsscale(other.maxabsscale == NULL ? NULL : new data::MaxAbsScaler(*other.maxabsscale)), + meanscale(other.meanscale == NULL ? NULL : + new data::MeanNormalization(*other.meanscale)), + standardscale(other.standardscale == NULL ? NULL : + new data::StandardScaler(*other.standardscale)), pcascale(other.pcascale == NULL ? NULL : new data::PCAWhitening(*other.pcascale)), zcascale(other.zcascale == NULL ? NULL : new data::ZCAWhitening(*other.zcascale)), - meanscale(other.meanscale == NULL ? NULL : - new data::MeanNormalization(*other.meanscale)), - standardscale(other.standardscale == NULL ? NULL : - new data::StandardScaler(*other.standardscale)) + minValue(other.minValue), + maxValue(other.maxValue), + epsilon(other.epsilon) { // Nothing to do. } @@ -62,13 +63,13 @@ ScalingModel::ScalingModel(ScalingModel&& other) : scalerType(other.scalerType), minmaxscale(other.minmaxscale), maxabsscale(other.maxabsscale), - pcascale(other.pcascale), - zcascale(other.zcascale), meanscale(other.meanscale), standardscale(other.standardscale), - epsilon(other.epsilon), + pcascale(other.pcascale), + zcascale(other.zcascale), minValue(other.minValue), - maxValue(other.maxValue) + maxValue(other.maxValue), + epsilon(other.epsilon) { other.scalerType = 0; other.minmaxscale = NULL; diff --git a/src/mlpack/tests/augmented_rnns_tasks_test.cpp b/src/mlpack/tests/augmented_rnns_tasks_test.cpp index e0f46b914a..cee38cab64 100644 --- a/src/mlpack/tests/augmented_rnns_tasks_test.cpp +++ b/src/mlpack/tests/augmented_rnns_tasks_test.cpp @@ -95,7 +95,8 @@ class HardCodedSortModel void Train(arma::field& predictors, arma::field& labels) { - assert(predictors.n_elem == labels.n_elem); + const bool check = predictors.n_elem == labels.n_elem; + assert(check == true); } void Predict(arma::mat& predictors,