Skip to content
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

Support for non-Float64 eltypes when using ForwardDiff #3

Merged
merged 4 commits into from
Dec 24, 2022

Conversation

torfjelde
Copy link
Contributor

See tests for example + things like

x = ComponentVector(x = zeros(3))
∇ℓ = ADgradient(:ForwardDiff, ℓ; input=x)

also works.

src/AD_ForwardDiff.jl Outdated Show resolved Hide resolved
src/AD_ForwardDiff.jl Outdated Show resolved Hide resolved
src/AD_ForwardDiff.jl Outdated Show resolved Hide resolved
src/AD_ForwardDiff.jl Outdated Show resolved Hide resolved
src/AD_ForwardDiff.jl Outdated Show resolved Hide resolved
src/AD_ForwardDiff.jl Outdated Show resolved Hide resolved
Copy link
Owner

@tpapp tpapp left a comment

Choose a reason for hiding this comment

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

Thanks for this PR, I am happy to merge once suggestions by @devmotion are implemented.

@tpapp
Copy link
Owner

tpapp commented Dec 24, 2022

@devmotion: I am on holiday and will only check my emails occasionally in the next week or so, feel free to merge this and tag a release once your suggestions are implemented, so that TuringLang/AdvancedHMC.jl#301 is not held up.

@torfjelde
Copy link
Contributor Author

Great! Made the changes:)

Copy link
Collaborator

@devmotion devmotion left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants