Skip to content

Fix function name in Hessian example in README #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ and a color vector and sparsity pattern, this can be accomplished using
`numauto_color_hessian` or its in-place form `numauto_color_hessian!`.

```julia
H = numauto_color_hessian(fscalar, x, colorvec, sparsity)
numauto_color_hessian!(H, fscalar, x, colorvec, sparsity)
H = numauto_color_hessian(f, x, colorvec, sparsity)
numauto_color_hessian!(H, f, x, colorvec, sparsity)
```

To avoid unnecessary allocations every time the Hessian is computed,
Expand All @@ -230,7 +230,7 @@ Alternatively, if you have your own custom gradient function `g!`, you can speci
it as an argument to `ForwardColorHesCache`:

```julia
hescache = ForwardColorHesCache(fscalar, x, colorvec, sparsity, g!)
hescache = ForwardColorHesCache(f, x, colorvec, sparsity, g!)
```
Note that any user-defined gradient needs to have the signature `g!(G, x)`,
i.e. updating the gradient `G` in place.
Expand Down Expand Up @@ -356,4 +356,4 @@ ArrayInterfaceBlockBandedMatrices.jl to basically work with any functionality
for sparsity patterns. In the future, those two packages should just depend on
ArrayInterface.jl and remove this issue entirely from the user space.

Additionally, GPUs need ArrayInterfaceGPUArrays for proper determination of the indexing.
Additionally, GPUs need ArrayInterfaceGPUArrays for proper determination of the indexing.