Forward propagation derived type handler
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_layer_type), | intent(inout) | :: | this |
Instance of the reshape layer |
||
| class(array_type), | intent(in), | dimension(:,:) | :: | input |
Input array |
subroutine forward_reshape(this, input) !! Forward propagation derived type handler implicit none ! Arguments class(reshape_layer_type), intent(inout) :: this !! Instance of the reshape layer class(array_type), dimension(:,:), intent(in) :: input !! Input array type(array_type), pointer :: ptr => null() ! Reshape input !--------------------------------------------------------------------------- call this%output(1,1)%zero_grad() ptr => reshape(input(1,1), this%output_shape) call this%output(1,1)%assign_and_deallocate_source(ptr) this%output(1,1)%is_temporary = .false. end subroutine forward_reshape