Code Snippets Fortran

Short texts Fortran 🧑‍💻 Code snippets Fortran ✍️ Reading lists Fortran 👀

NN activation and loss code snippet

!source -https://github.com/ketetefid/FortNN/blob/master/FortNN.f90 !——————————————————————– ! > !——————————————————————— !================================================================== PURE FUNCTION sigmoid (x) ! we will assume that all the inputs and outputs will be multidimensional ! like ndarray in python. this gives us more flexibility. ! so even a scalar input must be with dimension (1) REAL(kind=dp) , DIMENSION (:) , INTENT(in) :: x REAL(kind=dp) , […]

Test for Lapack DGESVDX with RANGE=’I’

PROGRAM testSVD IMPLICIT NONE INTEGER M, N, LDA, LDU, LDVT, NS, LWORK, INFO PARAMETER ( M = 5, N = 5, LDA = 10, LDU = 10, LDVT = 10 ) INTEGER IWORK( 12*MIN(M,N) ) DOUBLE PRECISION A( LDA, N ), S( MIN(M,N) ), $ U( LDU, N ), VT( LDVT, N ), WORK( 2000 […]