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

Provide function to extract the value from a dual tensor #208

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

KnutAM
Copy link
Member

@KnutAM KnutAM commented Sep 17, 2023

See the updated docstring for example and motivation, and this example, where the internal _extract_value is used, is a "real-world" use case.

Tensor.extract_value is defined (exclusively for AbstractTensor input) and documented in this PR. For scalars ForwardDiff.value should be used.

Due to the relatively generic name and fairly advanced (and not very frequent) use case, I think it is better to not export it, making it very clear that it is exclusively for tensors.

@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (258540f) 96.91% compared to head (2309e42) 96.91%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #208   +/-   ##
=======================================
  Coverage   96.91%   96.91%           
=======================================
  Files          17       17           
  Lines        1490     1492    +2     
=======================================
+ Hits         1444     1446    +2     
  Misses         46       46           
Files Coverage Δ
src/automatic_differentiation.jl 99.11% <100.00%> (+<0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants