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 all operations for Value<T>. #3

Open
arseniybelkov opened this issue Jul 20, 2024 · 0 comments
Open

Support all operations for Value<T>. #3

arseniybelkov opened this issue Jul 20, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@arseniybelkov
Copy link
Owner

arseniybelkov commented Jul 20, 2024

All the operations are implemented only for &Value<T>, which forbids the following code:

let x = Value::new(2f32);
let y = Value::new(3f32);
let z = &x + y; // Add is not implemented ...
z.backward();

In the case above, y should probably be stored in the graph, to make the backprop possible through it. It might be tempting to add indirection level via Box or Rc, but it must be done using no heap allocations.

@arseniybelkov arseniybelkov added the help wanted Extra attention is needed label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant