output_batch Function

private 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.

Arguments

Type IntentOptional AttributesName
class(network_type), intent(in) :: self
real(kind=rk), intent(in) :: x(:,:)

Return Value real(kind=rk), allocatable,(:,:)


Contents

Source Code


Source Code

  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