finalise_neural_operator Subroutine

private subroutine finalise_neural_operator(this)

Finalise neural operator layer

Arguments

Type IntentOptional Attributes Name
type(neural_operator_layer_type), intent(inout) :: this

Instance of the neural operator layer


Source Code

  subroutine finalise_neural_operator(this)
    !! Finalise neural operator layer
    implicit none

    ! Arguments
    type(neural_operator_layer_type), intent(inout) :: this
    !! Instance of the neural operator layer

    if(allocated(this%input_shape)) deallocate(this%input_shape)
    if(allocated(this%output)) deallocate(this%output)
    if(this%z(1)%allocated) call this%z(1)%deallocate()

  end subroutine finalise_neural_operator