get_partial_pad3d Function

function get_partial_pad3d(this, upstream_grad) result(output)

Get the partial derivative for the pad3d operation

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this
type(array_type), intent(in) :: upstream_grad

Return Value type(array_type)


Source Code

  function get_partial_pad3d(this, upstream_grad) result(output)
    !! Get the partial derivative for the pad3d operation
    implicit none

    ! Arguments
    class(array_type), intent(inout) :: this
    type(array_type), intent(in) :: upstream_grad
    type(array_type) :: output

    ! Local variables
    integer, dimension(5) :: input_shape

    input_shape = [ this%left_operand%shape, size(this%val, dim=2) ]
    call output%allocate(array_shape = input_shape)
    output%indices = this%indices
    output%adj_ja = this%adj_ja

    call this%get_partial_left_val(upstream_grad%val, output%val)

  end function get_partial_pad3d