diff options
author | Yangqing Jia <jiayq84@gmail.com> | 2018-01-29 10:00:43 -0800 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-01-29 10:03:28 -0800 |
commit | 91d76f5dbde782396d2777c9d2ae5cde2c83160d (patch) | |
tree | 46eef09585eae90da928ab30f2da0829046ce2ca /caffe2/operators/selu_op.h | |
parent | 657214543cfd76e06c4f295772f5676377ff347b (diff) | |
download | pytorch-91d76f5dbde782396d2777c9d2ae5cde2c83160d.tar.gz pytorch-91d76f5dbde782396d2777c9d2ae5cde2c83160d.tar.bz2 pytorch-91d76f5dbde782396d2777c9d2ae5cde2c83160d.zip |
Reapply Windows fix
Summary:
Last fix was uncommitted due to a bug in internal build (CAFFE2_API causing error). This one re-applies it as well as a few more, especially enabling gtest.
Earlier commit message: Basically, this should make windows {static_lib, shared_lib} * {static_runtime, shared_runtime} * {cpu, gpu} work other than gpu shared_lib, which willyd kindly pointed out a symbol limit problem. A few highlights:
(1) Updated newest protobuf.
(2) use protoc dllexport command to ensure proper symbol export for windows.
(3) various code updates to make sure that C2 symbols are properly shown
(4) cmake file changes to make build proper
(5) option to choose static runtime and shared runtime similar to protobuf
(6) revert to visual studio 2015 as current cuda and msvc 2017 do not play well together.
(7) enabled gtest and fixed testing bugs.
Earlier PR is #1793
Closes https://github.com/caffe2/caffe2/pull/1827
Differential Revision: D6832086
Pulled By: Yangqing
fbshipit-source-id: 85f86e9a992ee5c53c70b484b761c9d6aed721df
Diffstat (limited to 'caffe2/operators/selu_op.h')
-rw-r--r-- | caffe2/operators/selu_op.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/caffe2/operators/selu_op.h b/caffe2/operators/selu_op.h index a00b9d580d..3726db7e60 100644 --- a/caffe2/operators/selu_op.h +++ b/caffe2/operators/selu_op.h @@ -16,9 +16,9 @@ class SeluOp final : public Operator<Context> { SeluOp(const OperatorDef& operator_def, Workspace* ws) : Operator<Context>(operator_def, ws) { alpha_ = OperatorBase::GetSingleArgument<T>( - "alpha", 1.6732632423543772848170429916717); + "alpha", 1.6732632423543772848170429916717f); lambda_ = OperatorBase::GetSingleArgument<T>( - "scale", 1.0507009873554804934193349852946); + "scale", 1.0507009873554804934193349852946f); // In the paper "scale" is named "lambda", but "lambda" is a reserved // keyword in python CAFFE_ENFORCE_GT(lambda_, 1.0); @@ -38,9 +38,9 @@ class SeluGradientOp final : public Operator<Context> { SeluGradientOp(const OperatorDef& operator_def, Workspace* ws) : Operator<Context>(operator_def, ws) { alpha_ = OperatorBase::GetSingleArgument<T>( - "alpha", 1.6732632423543772848170429916717); + "alpha", 1.6732632423543772848170429916717f); lambda_ = OperatorBase::GetSingleArgument<T>( - "scale", 1.0507009873554804934193349852946); + "scale", 1.0507009873554804934193349852946f); CAFFE_ENFORCE_GT(lambda_, 1.0); } |