From cdf2912074456773d02c4f6ca082c0fca63f6e4b Mon Sep 17 00:00:00 2001 From: Shubham Agrawal Date: Fri, 10 Jun 2022 14:37:06 +0530 Subject: [PATCH] operator issue in vector --- src/mlpack/methods/ann/layer/lambda_map_reduce_impl.hpp | 1 - src/mlpack/methods/ann/reduction_rules/add_reduction.hpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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; }