Gradient of duvenaud_update with respect to input features.
| 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 right operand (input features)
function get_partial_duvenaud_update(this, upstream_grad) result(output) !! Gradient of duvenaud_update with respect to input features. 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 right operand (input features) ! Local variables logical :: left_is_temporary_local !! Saved temporary-ownership flag for left operand type(array_type), pointer :: ptr !! Intermediate gradient tensor pointer left_is_temporary_local = this%left_operand%is_temporary this%left_operand%is_temporary = .false. ptr => duvenaud_update( upstream_grad, this%left_operand, & this%indices, this%left_operand%indices(1), this%left_operand%indices(2) ) this%left_operand%is_temporary = left_is_temporary_local call output%assign_and_deallocate_source(ptr) end function get_partial_duvenaud_update