From cad5e73aca4b00a30864aa263dd8b33f128bcd93 Mon Sep 17 00:00:00 2001 From: Nippun Sharma <53967069+NippunSharma@users.noreply.github.com> Date: Thu, 17 Dec 2020 10:51:05 +0530 Subject: [PATCH] Update src/mlpack/methods/ann/util/check_input_shape.hpp Co-authored-by: Ryan Curtin --- src/mlpack/methods/ann/util/check_input_shape.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mlpack/methods/ann/util/check_input_shape.hpp b/src/mlpack/methods/ann/util/check_input_shape.hpp index 653c21276a..566c363e3f 100644 --- a/src/mlpack/methods/ann/util/check_input_shape.hpp +++ b/src/mlpack/methods/ann/util/check_input_shape.hpp @@ -38,10 +38,9 @@ void CheckInputShape(const T& network, const size_t inputShape, } else { - std::string estr = functionName + ": "; - estr += "the first layer of the network expects "; - estr += std::to_string(layerInShape) + " elements, "; - estr += "but the input has " + std::to_string(inputShape) + " dimensions! "; + std::string estr = functionName + ": the first layer of the network " + + "expects " + std::to_string(layerInShape) + " elements, but the " + + "input has " + std::to_string(inputShape) + " dimensions!"; throw std::logic_error(estr); } }