Skip to content

Autodiffbackend #2476

Answered by laggui
wangjiawen2013 asked this question in Q&A
Discussion options

You must be logged in to vote

Yep! The device can be inferred from the backend, but not the other way around. NdArray is a concrete backend implementation, and Autodiff also implements Backend but uses the inner backend to perform the tensor operations and adds auto-differentiation capabilities to the backend used. Autodiff is intended to be used as a decorator/wrapper, which means you have to be explicit about when to use it. This is intended so you specify explicitly when you want to track the operations graph, otherwise you'd be wasting resources for nothing 🙂

See also: #2415

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by laggui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2469 on November 11, 2024 13:26.