diff --git a/src/mlpack/methods/ann/layer/lambda_map_reduce_impl.hpp b/src/mlpack/methods/ann/layer/lambda_map_reduce_impl.hpp index fbbbde31f9..28ffae693b 100644 --- a/src/mlpack/methods/ann/layer/lambda_map_reduce_impl.hpp +++ b/src/mlpack/methods/ann/layer/lambda_map_reduce_impl.hpp @@ -292,7 +292,6 @@ void LambdaMapReduceType::ComputeOutputDimensions() this->outputDimensions = this->inputDimensions; return; } - network.front()->InputDimensions() = this->inputDimensions; inSize = this->inputDimensions[0]; for (size_t i = 1; i < this->inputDimensions.size(); ++i) inSize *= this->inputDimensions[i]; diff --git a/src/mlpack/methods/ann/reduction_rules/add_reduction.hpp b/src/mlpack/methods/ann/reduction_rules/add_reduction.hpp index b10f74d1b2..11bf91d39e 100644 --- a/src/mlpack/methods/ann/reduction_rules/add_reduction.hpp +++ b/src/mlpack/methods/ann/reduction_rules/add_reduction.hpp @@ -73,7 +73,7 @@ class AddReductionType const std::vector networkSize = network[0]->OutputDimensions(); for (size_t i = 1; i < network.size(); i++) { - if (networkSize != network[i]->OutputDimensions()) + if (!(networkSize == network[i]->OutputDimensions())) { Log::Fatal << "Network size mismatch." << std::endl; }