Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ThummeTo authored Oct 18, 2022
1 parent cfe04c6 commit c89ccc8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Technically, the last two candidates aim both for forward sensitivities, so incl

2\. Install [*ForwardDiffChainRules.jl*](https://github.com/ThummeTo/ForwardDiffChainRules.jl):
```julia-repl
(@v1.6) pkg> add ForwardDiffChainRules.jl
(@v1.6) pkg> add ForwardDiffChainRules
```

3\. If you want to check that everything works correctly, you can run the tests bundled with [*ForwardDiffChainRules.jl*](https://github.com/ThummeTo/ForwardDiffChainRules.jl):
```julia-repl
(@v1.6) pkg> test ForwardDiffChainRules.jl
(@v1.6) pkg> test ForwardDiffChainRules
```

4\. Have a look inside the [examples folder](https://github.com/ThummeTo/ForwardDiffChainRules.jl/tree/main/examples).
Expand All @@ -31,8 +31,14 @@ Technically, the last two candidates aim both for forward sensitivities, so incl
```julia
using ForwardDiffChainRules

# define your frule as usual
function f1(x1, x2)
# do whatever you want to do in your function
return (x + 2y).^2
end

# define your frule for function f1 as usual
function ChainRulesCore.frule((_, Δx1, Δx2), ::typeof(f1), x1, x2)
# this could be any code you want of course
return f1(x1, x2), Δx1 + Δx2
end

Expand Down

2 comments on commit c89ccc8

@ThummeTo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/70479

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" c89ccc800b14e0637fdda73d9d141c2915877dbe
git push origin v0.1.0

Please sign in to comment.