Unverified Commit 9183ce69 authored by dummycoderfe's avatar dummycoderfe Committed by GitHub
Browse files

hot_fix epsilon pos (#1597)


Co-authored-by: default avatardummycoderfe <noplydummmycoder@163.com>
parent 8e22e1ae
......@@ -90,7 +90,7 @@ struct Layernorm2dFwdPipelineOnePass
// compute inv-std
auto inv_std = tile_elementwise_in(
[&](const auto& v_) {
return type_convert<ComputeDataType>(1.0f) / (sqrt(v_) + epsilon);
return type_convert<ComputeDataType>(1.0f) / (sqrt(v_ + epsilon));
},
var);
......
......@@ -105,7 +105,7 @@ struct Layernorm2dFwdPipelineTwoPass
// compute inv-std
auto inv_std = tile_elementwise_in(
[&](const auto& v_) {
return type_convert<ComputeDataType>(1.0f) / (sqrt(v_) + epsilon);
return type_convert<ComputeDataType>(1.0f) / (sqrt(v_ + epsilon));
},
var);
......
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