Forward pass for the layer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_layer_type), | intent(inout) | :: | this |
Instance of the layer |
||
| class(array_type), | intent(in), | dimension(:,:) | :: | input |
Input data |
module subroutine forward_base(this, input) !! Forward pass for the layer implicit none ! Arguments class(base_layer_type), intent(inout) :: this !! Instance of the layer class(array_type), dimension(:,:), intent(in) :: input !! Input data ! Local variables integer :: i, j !! Loop indices do i = 1, size(input, 1) do j = 1, size(input, 2) if(.not.input(i,j)%allocated)then call stop_program('Input to input layer not allocated') return end if this%output(i,j) = input(i,j) end do end do end subroutine forward_base