From 2f27b103310d08642eb4378dd2708576b5fe61b6 Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Fri, 8 Nov 2019 15:47:12 +0800 Subject: [PATCH] Add dependency for error_codes.proto (#21084) * fix activation_functions deps, test=develop, test=document_fix * add error_codes_proto deps, test=develop, test=document_fix * try delete enforce.h, test=develop, test=document_fix --- paddle/fluid/operators/math/detail/activation_functions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/math/detail/activation_functions.h b/paddle/fluid/operators/math/detail/activation_functions.h index 24df1f93ed..5476b1a2d3 100644 --- a/paddle/fluid/operators/math/detail/activation_functions.h +++ b/paddle/fluid/operators/math/detail/activation_functions.h @@ -14,9 +14,9 @@ limitations under the License. */ #pragma once #include +#include #include #include "paddle/fluid/platform/cpu_info.h" -#include "paddle/fluid/platform/enforce.h" #include "paddle/fluid/platform/hostdevice.h" namespace paddle { @@ -45,7 +45,7 @@ inline ActivationType GetActivationType(const std::string &type) { } else if (type == "identity" || type == "") { return ActivationType::kIdentity; } - PADDLE_THROW("Not support type %s.", type); + throw std::invalid_argument("The input type is not supported"); } namespace forward { -- GitLab