File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -83,13 +83,13 @@ end function
83
83
elemental ${rt}$ module function gelu_${rk}$( x ) result( y )
84
84
${rt}$, intent(in) :: x
85
85
86
- y = 0.5_${rk}$ * x * (1 + erf(x * isqrt2_${rk}$))
86
+ y = 0.5_${rk}$ * x * (1._${rk}$ + erf(x * isqrt2_${rk}$))
87
87
end function
88
88
89
89
elemental ${rt}$ module function gelu_grad_${rk}$( x ) result( y )
90
90
${rt}$, intent(in) :: x
91
91
92
- y = 0.5_${rk}$ * (1 + erf(x * isqrt2_${rk}$) )
92
+ y = 0.5_${rk}$ * (1._${rk}$ + erf(x * isqrt2_${rk}$) )
93
93
y = y + x * isqrt2_${rk}$ * exp( - 0.5_${rk}$ * x**2 )
94
94
end function
95
95
@@ -317,9 +317,9 @@ elemental ${rt}$ module function ftanh_${rk}$( x ) result( y )
317
317
${rt}$, intent(in) :: x
318
318
${rt}$ :: x2, a, b
319
319
320
- if (x > 5_ ${rk}$) then
320
+ if (x > 5._ ${rk}$) then
321
321
y = 1._${rk}$
322
- elseif (x < -5_ ${rk}$) then
322
+ elseif (x < -5._ ${rk}$) then
323
323
y = -1._${rk}$
324
324
else
325
325
x2 = x*x
You can’t perform that action at this time.
0 commit comments