Skip to content

Commit

Permalink
Improve refs
Browse files Browse the repository at this point in the history
  • Loading branch information
lostella committed Jan 21, 2024
1 parent f1a8e26 commit 82eab66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/src/guide/custom_objectives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#
# Defining the proximal mapping for a custom function type requires adding a method for [`ProximalCore.prox!`](@ref).
#
# To compute gradients, algorithms use [`ProximalAlgorithms.value_and_gradient_closure`](@ref):
# To compute gradients, algorithms use [`value_and_gradient_closure`](@ref):
# this relies on [AbstractDifferentiation](https://github.com/JuliaDiff/AbstractDifferentiation.jl), for automatic differentiation
# with any of its supported backends, when functions are wrapped in [`ProximalAlgorithms.AutoDifferentiable`](@ref),
# with any of its supported backends, when functions are wrapped in [`AutoDifferentiable`](@ref),
# as the examples below show.
#
# If however you would like to provide your own gradient implementation (e.g. for efficiency reasons),
# you can simply implement a method for [`ProximalAlgorithms.value_and_gradient_closure`](@ref) on your own function type.
# you can simply implement a method for [`value_and_gradient_closure`](@ref) on your own function type.
#
# ```@docs
# ProximalCore.prox
Expand Down Expand Up @@ -105,7 +105,7 @@ end

Counting(f::T) where {T} = Counting{T}(f, 0, 0, 0)

# Now we only need to intercept any call to `value_and_gradient_closure` and `prox!` and increase counters there:
# Now we only need to intercept any call to [`value_and_gradient_closure`](@ref) and [`prox!`](@ref) and increase counters there:

function ProximalAlgorithms.value_and_gradient_closure(f::Counting, x)
f.eval_count += 1
Expand Down

0 comments on commit 82eab66

Please sign in to comment.