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 11#:include "common.fypp"
22#:set RANKS = range(2, MAXRANK + 1)
33submodule(stdlib_specialfunctions) stdlib_specialfunctions_activations
4+ use stdlib_intrinsics, only: sum => stdlib_sum
45 implicit none
56
67 #:for rk, rt in REAL_KINDS_TYPES
@@ -333,8 +334,8 @@ end function
333334! Fast intrinsics for accelerated activations
334335!==================================================
335336
336- #:for rk, rt in REAL_KINDS_TYPES
337337! 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
338339elemental module function fast_tanh_${rk}$( x ) result( y )
339340 ${rt}$, intent(in) :: x
340341 ${rt}$ :: y
@@ -352,7 +353,6 @@ elemental module function fast_tanh_grad_${rk}$( x ) result( y )
352353 y = 1._${rk}$ - fast_tanh(x)**2
353354end function
354355
355- ! Source: https://fortran-lang.discourse.group/t/fastgpt-faster-than-pytorch-in-300-lines-of-fortran/5385/31
356356elemental module function fast_erf_${rk}$( x ) result( y )
357357 ${rt}$, intent(in) :: x
358358 ${rt}$ :: y
You can’t perform that action at this time.
0 commit comments