In-place value gradient for duvenaud_propagate right operand.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_type), | intent(in) | :: | this |
Forward result node containing saved operands |
||
| real(kind=real32), | intent(in), | dimension(:,:) | :: | upstream_grad |
Upstream gradient values |
|
| real(kind=real32), | intent(out), | dimension(:,:) | :: | output |
Output gradient values for right operand |
pure subroutine get_partial_duvenaud_propagate_right_val( & this, upstream_grad, output & ) !! In-place value gradient for duvenaud_propagate right operand. implicit none ! Arguments class(array_type), intent(in) :: this !! Forward result node containing saved operands real(real32), dimension(:,:), intent(in) :: upstream_grad !! Upstream gradient values real(real32), dimension(:,:), intent(out) :: output !! Output gradient values for right operand ! Local variables integer :: v, w, num_features, num_elements !! Loop indices and operand shape values num_features = size(this%left_operand%val,1) num_elements = size(this%left_operand%val,2) output = 0._real32 do concurrent(v=1:num_elements) do w = this%indices(v), this%indices(v+1)-1 output(:,this%adj_ja(2,w)) = output(:,this%adj_ja(2,w)) + & [ upstream_grad(num_features+1:, v) ] end do end do end subroutine get_partial_duvenaud_propagate_right_val