Comments (3)
Hey, thanks for trying out my library!
So for reverse AD, we don't actually compute anything until we call autodiff
on the final expression. When we write for example
Var<double> a, b{2};
a = 5. * b * b;
the result of 5. * b * b
does not get computed and "stored" in a
. The expression a = 5. * b * b
returns a completely different object representing it. So a working example would be something like
Var<double> a, b{2};
auto expr = (a = 5. * b * b);
autodiff(expr); // now a and b contain derivative values
And I couldn't think of a good use-case where operator+=
would shine from simply using operator=
. Is there a use-case you had in mind?
For forward AD using ad::ForwardVar
, I think it makes sense to overload these operators so I can add that feature.
For allowing floating point values with ad::Var, I think that's a fair point too, I'll get around adding that! For now, you have to use ad::constant(5.)
in place of 5.
.
from fastad.
#84 literals can now be used to construct expressions without the need for user to explicitly write ad::constant
from fastad.
#86 includes support for convenience operators: operator+=, operator-=, operator*=., operator/=
for reverse mode
from fastad.
Related Issues (20)
- It is difficult to describe complex expressions, especially when there is a for loop HOT 1
- Jacobian
- Enable CMake integration with FetchContent
- Some general qs. about FastAD (new to C++) HOT 1
- Extending black-scholes example HOT 9
- Problem using example in readme HOT 1
- using FastAD were Scalar type is a template parameter ?
- Non-templated expression container? HOT 1
- Support for sparse matrices
- ad::Mat unittest fix iter_size_comp to for-loop HOT 1
- Change pthread and -Werror -Wextra to non-MSVC HOT 1
- AutoPPL finds sumnode to be the source of major overhead HOT 1
- How to get nth derivative? HOT 6
- LeafNode new member function: reset_value_ptr, reset_adj_ptr
- SqrtNode has unnecessary dependency on Eigen
- New Features
- Internal interface change from using `bind` to `bind_cache`
- Improvement to Forward mode HOT 5
- Supporting mat transpose. HOT 2
- operator overload of conventional data types such as double HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastad.