File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
#:include "common.fypp"
2
2
#:set RANKS = range(2, MAXRANK + 1)
3
3
submodule(stdlib_specialfunctions) stdlib_specialfunctions_activations
4
+ use stdlib_intrinsics, only: sum => stdlib_sum
4
5
implicit none
5
6
6
7
#:for rk, rt in REAL_KINDS_TYPES
@@ -333,8 +334,8 @@ end function
333
334
! Fast intrinsics for accelerated activations
334
335
!==================================================
335
336
336
- #:for rk, rt in REAL_KINDS_TYPES
337
337
! Source: https://fortran-lang.discourse.group/t/fastgpt-faster-than-pytorch-in-300-lines-of-fortran/5385/31
338
+ #:for rk, rt in REAL_KINDS_TYPES
338
339
elemental module function fast_tanh_${rk}$( x ) result( y )
339
340
${rt}$, intent(in) :: x
340
341
${rt}$ :: y
@@ -352,7 +353,6 @@ elemental module function fast_tanh_grad_${rk}$( x ) result( y )
352
353
y = 1._${rk}$ - fast_tanh(x)**2
353
354
end function
354
355
355
- ! Source: https://fortran-lang.discourse.group/t/fastgpt-faster-than-pytorch-in-300-lines-of-fortran/5385/31
356
356
elemental module function fast_erf_${rk}$( x ) result( y )
357
357
${rt}$, intent(in) :: x
358
358
${rt}$ :: y
You can’t perform that action at this time.
0 commit comments