Skip to content

Backend and autodiffbackend #2415

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

You must be logged in to vote

In the examples we use Autodiff to wrap the backend in use (e.g., Autodiff<B>).

Backend and AutodiffBackend are both traits that are implemented for the backends to support tensor operations and auto differentiation respectively.

When you use Autodiff<B>, then AutodiffBackend is used all the time 😉 and having it this way makes it nice and easy to specify that you want to add auto differentiation to the backend when you need it.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@wangjiawen2013
Comment options

@laggui
Comment options

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
2 participants