Step activation function.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | x(:) |
pure function step(x) result(res)
!! Step activation function.
real(rk), intent(in) :: x(:)
real(rk) :: res(size(x))
where (x > 0)
res = 1
elsewhere
res = 0
end where
end function step