"vscode:/vscode.git/clone" did not exist on "30bcda7de6c2e361cd01334763aab4d9a8dd9376"
Commit e10df63e authored by Jing Zhang's avatar Jing Zhang
Browse files

fixed comments

parent adc64a23
...@@ -25,7 +25,7 @@ struct YElementOp ...@@ -25,7 +25,7 @@ struct YElementOp
ck::tensor_operation::element_wise::Sigmoid{}(a, x); ck::tensor_operation::element_wise::Sigmoid{}(a, x);
y = x * a; y = type_convert<Y>(x * a);
}; };
}; };
......
...@@ -30,7 +30,7 @@ struct PassThrough ...@@ -30,7 +30,7 @@ struct PassThrough
template <> template <>
__host__ __device__ void operator()<float, double>(float& y, const double& x) const __host__ __device__ void operator()<float, double>(float& y, const double& x) const
{ {
y = x; y = type_convert<float>(x);
} }
template <> template <>
...@@ -431,7 +431,8 @@ struct Swish ...@@ -431,7 +431,8 @@ struct Swish
is_same<X, ck::half_t>::value, is_same<X, ck::half_t>::value,
"Data type is not supported by this operation!"); "Data type is not supported by this operation!");
y = x / (ck::type_convert<Y>(1) + ck::math::exp(-beta_ * x)); float bx = -beta_ * type_convert<float>(x);
y = type_convert<Y>(x / (1.f + ck::math::exp(bx)));
}; };
float beta_ = 1.0f; float beta_ = 1.0f;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment