Skip to content

Commit

Permalink
cleanup before registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Devetak committed Feb 22, 2024
1 parent 799d2ea commit 553dd0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ignore_gradient.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ end
Constructs a pass trough function for the given function `f` and gradient
function `g`. The pass trough function is a function that returns the same
value as `f` but the gradient is taken from `g`. Optional parameter k controls
the steepnes of the gradient, default is 1.
the steepnes of the gradient, default is 1. Supports both scalars and arrays.
"""
function construct_diff_version(f, g)
Expand All @@ -38,7 +38,7 @@ function construct_diff_version(f, g)
error("Type not supported only supports Number and AbstractArray.")
end
end
zero = g(x * k) .- ignore_gradient(g(x * k))
zero = g(x .* k) .- ignore_gradient(g(x .* k))
return ignore_gradient(f(x)) .+ zero
end
return pass_trough_function
Expand Down
1 change: 0 additions & 1 deletion src/sign_diff.jl

This file was deleted.

2 comments on commit 553dd0c

@Devetak
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 updated: JuliaRegistries/General/99318

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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>" 553dd0c6370a37ca00dc75e60f75dad1b26725a4
git push origin v0.1.0

Please sign in to comment.