Gradient of gno_aggregate w.r.t. features (left operand)
d(m_i)/d(h_j) = kappa_{ij}^T (the [F_in, F_out] transpose) So: grad_h(j) += kappa_{ij}^T @ upstream(:,i)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_type), | intent(inout) | :: | this |
Forward result node containing saved operands |
||
| type(array_type), | intent(in) | :: | upstream_grad |
Upstream gradient tensor |
Gradient tensor for node features
function get_partial_gno_agg_features(this, upstream_grad) result(output) !! Gradient of gno_aggregate w.r.t. features (left operand) !! !! d(m_i)/d(h_j) = kappa_{ij}^T (the [F_in, F_out] transpose) !! So: grad_h(j) += kappa_{ij}^T @ upstream(:,i) 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 node features 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_agg_features