finalise_ono_attn Subroutine

private subroutine finalise_ono_attn(this)

Finalise the orthogonal attention layer

Arguments

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

Layer instance to release


Source Code

  subroutine finalise_ono_attn(this)
    !! Finalise the orthogonal attention layer
    implicit none

    ! Arguments
    type(orthogonal_attention_layer_type), intent(inout) :: this
    !! Layer instance to release

    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_ono_attn