Initialise gradients for base optimiser
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_optimiser_type), | intent(inout) | :: | this |
Instance of the base optimiser |
||
| integer, | intent(in) | :: | num_params |
Number of parameters |
pure subroutine init_gradients_base(this, num_params) !! Initialise gradients for base optimiser implicit none ! Arguments class(base_optimiser_type), intent(inout) :: this !! Instance of the base optimiser integer, intent(in) :: num_params !! Number of parameters !allocate(this%velocity(num_params), source=0._real32) end subroutine init_gradients_base