Skip to content

Commit 14af3f9

Browse files
committed
examples bugfix
1 parent 9e9b28b commit 14af3f9

11 files changed

+20
-30
lines changed

doc/specs/stdlib_specialfunctions_activations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ scale * (\alpha * exp(x) - \alpha ), & \text{otherwise}
337337
\end{cases}
338338
$$
339339
Where,
340-
$scale = 1.0507009873554804934193349852946$ and $\alpha = 1.6732632423543772848170429916717$
340+
$$scale = 1.0507009873554804934193349852946$$ and $$\alpha = 1.6732632423543772848170429916717$$
341341

342342
### Syntax
343343

example/specialfunctions_activations/example_elu.f90

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ program example_elu
22
use stdlib_kinds, only: sp
33
use stdlib_math, only: linspace
44
use stdlib_specialfunctions, only: elu
5-
5+
implicit none
66
integer, parameter :: n = 10
77
real(sp) :: x(n), y(n)
8-
implicit none
98

109
x = linspace(-2._sp, 2._sp, n)
1110
y = elu( x , 1.0 )

example/specialfunctions_activations/example_gaussian.f90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ program example_gaussian
22
use stdlib_kinds, only: sp
33
use stdlib_math, only: linspace
44
use stdlib_specialfunctions, only: gaussian
5-
5+
implicit none
66
integer, parameter :: n = 10
77
real(sp) :: x(n), y(n)
8-
implicit none
9-
8+
109
x = linspace(-2._sp, 2._sp, n)
1110
y = gaussian( x )
1211
print *, y

example/specialfunctions_activations/example_gelu.f90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ program example_gelu
22
use stdlib_kinds, only: sp
33
use stdlib_math, only: linspace
44
use stdlib_specialfunctions, only: gelu
5-
5+
implicit none
66
integer, parameter :: n = 10
77
real(sp) :: x(n), y(n)
8-
implicit none
9-
8+
109
x = linspace(-2._sp, 2._sp, n)
1110
y = gelu( x )
1211
print *, y

example/specialfunctions_activations/example_logsoftmax.f90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ program example_logsoftmax
22
use stdlib_kinds, only: sp
33
use stdlib_math, only: linspace
44
use stdlib_specialfunctions, only: logsoftmax
5-
5+
implicit none
66
integer, parameter :: n = 10
77
real(sp) :: x(n), y(n)
8-
implicit none
9-
8+
109
x = linspace(-2._sp, 2._sp, n)
1110
y = logsoftmax( x )
1211
print *, y

example/specialfunctions_activations/example_relu.f90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ program example_relu
22
use stdlib_kinds, only: sp
33
use stdlib_math, only: linspace
44
use stdlib_specialfunctions, only: relu
5-
5+
implicit none
66
integer, parameter :: n = 10
77
real(sp) :: x(n), y(n)
8-
implicit none
9-
8+
109
x = linspace(-2._sp, 2._sp, n)
1110
y = relu( x )
1211
print *, y

example/specialfunctions_activations/example_selu.f90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ program example_selu
22
use stdlib_kinds, only: sp
33
use stdlib_math, only: linspace
44
use stdlib_specialfunctions, only: selu
5-
5+
implicit none
66
integer, parameter :: n = 10
77
real(sp) :: x(n), y(n)
8-
implicit none
9-
8+
109
x = linspace(-2._sp, 2._sp, n)
1110
y = selu( x )
1211
print *, y

example/specialfunctions_activations/example_silu.f90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ program example_silu
22
use stdlib_kinds, only: sp
33
use stdlib_math, only: linspace
44
use stdlib_specialfunctions, only: silu
5-
5+
implicit none
66
integer, parameter :: n = 10
77
real(sp) :: x(n), y(n)
8-
implicit none
9-
8+
109
x = linspace(-2._sp, 2._sp, n)
1110
y = silu( x )
1211
print *, y

example/specialfunctions_activations/example_softmax.f90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ program example_softmax
22
use stdlib_kinds, only: sp
33
use stdlib_math, only: linspace
44
use stdlib_specialfunctions, only: softmax
5-
5+
implicit none
66
integer, parameter :: n = 10
77
real(sp) :: x(n), y(n)
8-
implicit none
9-
8+
109
x = linspace(-2._sp, 2._sp, n)
1110
y = softmax( x )
1211
print *, y

example/specialfunctions_activations/example_softplus.f90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ program example_softplus
22
use stdlib_kinds, only: sp
33
use stdlib_math, only: linspace
44
use stdlib_specialfunctions, only: softplus
5-
5+
implicit none
66
integer, parameter :: n = 10
77
real(sp) :: x(n), y(n)
8-
implicit none
9-
8+
109
x = linspace(-2._sp, 2._sp, n)
1110
y = softplus( x )
1211
print *, y

0 commit comments

Comments
 (0)