diff --git a/src/mlpack/methods/ann/augmented/tasks/add_impl.hpp b/src/mlpack/methods/ann/augmented/tasks/add_impl.hpp index e4cefd5950..0d37086ed5 100644 --- a/src/mlpack/methods/ann/augmented/tasks/add_impl.hpp +++ b/src/mlpack/methods/ann/augmented/tasks/add_impl.hpp @@ -44,8 +44,12 @@ void AddTask::GenerateData(arma::field& input, // Random uniform length from [2..bitLen] size_t size_A = 2 + std::rand() % (bitLen - 1); size_t size_B = 2 + std::rand() % (bitLen - 1); - // Construct sequence of the form (binary number with size_A bits) + '+' + (binary number with size_B bits) - input(i) = arma::randi(size_A + size_B + 1, arma::distr_param(0, 1)); + // Construct sequence of the form + // (binary number with size_A bits) + '+' + // + (binary number with size_B bits) + input(i) = arma::randi( + size_A + size_B + 1, arma::distr_param(0, 1) + ); input(i).at(size_A) = +100; int val_A = 0; for (size_t k = 0; k < size_A; ++k) { diff --git a/src/mlpack/methods/ann/augmented/tasks/sort_impl.hpp b/src/mlpack/methods/ann/augmented/tasks/sort_impl.hpp index 14cb7ea2bf..8a14e31ab7 100644 --- a/src/mlpack/methods/ann/augmented/tasks/sort_impl.hpp +++ b/src/mlpack/methods/ann/augmented/tasks/sort_impl.hpp @@ -30,7 +30,8 @@ namespace ann /* Artificial Neural Network */ { namespace augmented /* Augmented neural network */ { namespace tasks /* Task utilities for augmented */ { -SortTask::SortTask(size_t maxLength, size_t bitLen) : maxLength(maxLength), bitLen(bitLen) {} +SortTask::SortTask(size_t maxLength, size_t bitLen) + : maxLength(maxLength), bitLen(bitLen) {} void SortTask::GenerateData(arma::field& input, arma::field& labels, diff --git a/src/mlpack/tests/augmented_rnns_tasks_test.cpp b/src/mlpack/tests/augmented_rnns_tasks_test.cpp index 9bcbe62893..4c21a53ae3 100644 --- a/src/mlpack/tests/augmented_rnns_tasks_test.cpp +++ b/src/mlpack/tests/augmented_rnns_tasks_test.cpp @@ -124,7 +124,8 @@ public: auto digit = predictors.at(i); if (digit != 0 && digit != 1) { - // We should not see two separators - we are adding *two* numbers in the task + // We should not see two separators + // since we are adding *two* numbers in the task assert(!num); num = true; }