get_partial_gno_kernel_coords Function

function get_partial_gno_kernel_coords(this, upstream_grad) result(output)

Gradient of gno_kernel_eval w.r.t. edge features (left operand)

upstream_grad has shape [F, num_edges] output has shape [d, num_edges]

Arguments

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

Forward result node containing saved operands

type(array_type), intent(in) :: upstream_grad

Upstream gradient tensor

Return Value type(array_type)

Gradient tensor for coordinates


Source Code

  function get_partial_gno_kernel_coords(this, upstream_grad) result(output)
    !! Gradient of gno_kernel_eval w.r.t. edge features (left operand)
    !!
    !! upstream_grad has shape [F, num_edges]
    !! output has shape [d, num_edges]
    implicit none

    ! Arguments
    class(array_type), intent(inout) :: this
    !! Forward result node containing saved operands
    type(array_type), intent(in) :: upstream_grad
    !! Upstream gradient tensor
    type(array_type) :: output
    !! Gradient tensor for coordinates

    call output%allocate(array_shape=shape(this%left_operand%val))
    call this%get_partial_left_val(upstream_grad%val, output%val)

  end function get_partial_gno_kernel_coords