raskr / rust-autograd

Tensors and differentiable operations (like TensorFlow) in Rust
MIT License
487 stars 37 forks source link

Could I get a value "0" when it is not differentiable at any variable ,No panic? #56

Closed Dirreke closed 2 years ago

Dirreke commented 2 years ago

When I get the differential of constant at variable, I hope I can get the value "0" or an option of error, but it returns panic

raskr commented 2 years ago

grad_helper doesn't panic, but this may not be what you want. Getting 0 is impossible currently.

raskr commented 2 years ago

Fixed in the master head