Use forward propagation to compute the output of the network. This specific procedure is for a batch of 1-d input data.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(network_type), | intent(in) | :: | self | |||
| real(kind=rk), | intent(in) | :: | x(:,:) |
pure function output_batch(self, x) result(a)
!! Use forward propagation to compute the output of the network.
!! This specific procedure is for a batch of 1-d input data.
class(network_type), intent(in) :: self
real(rk), intent(in) :: x(:,:)
real(rk), allocatable :: a(:,:)
integer(ik) :: i
allocate(a(self % dims(size(self % dims)), size(x, dim=2)))
do i = 1, size(x, dim=2)
a(:,i) = self % output_single(x(:,i))
end do
end function output_batch