Comments (6)
If I'm not mistaken, the parameter eps
is used to calculate the round-off error and should be set to the machine epsilon of the corresponding data type. The issue is that TINY
is Float64
, so bound
always is Float64
, even if the function outputs Float32
s. In that case, eps
is incorrectly set to the machine epsilon of Float64
s, so the step size will be off.
For the particular case of Float64
s and Float32
s, most likely changing TINY
to 1f-20
will fix most of the issues.
from finitedifferences.jl.
Yes, that's a good suggestion. We should carefully check the code, to ensure that the assumption of Float64
s is not also subtly baked in in other places.
from finitedifferences.jl.
Actually, it might make sense just to replace TINY
with a function called add_tiny
or something to prevent accidentally forgetting to cast stuff.
from finitedifferences.jl.
Might make sense to cast it explicitly wherever it's used to the element type of the thing that it's being added to. This way if (for some reason) we ever use Float16
s or some extended-precision stuff we're protected.
from finitedifferences.jl.
Yes, that's an even better solution.
from finitedifferences.jl.
Do we have a good example where the accuracy for Float32
s is not what we would like it to be? I wonder if v0.12 resolves these issues.
from finitedifferences.jl.
Related Issues (20)
- Jacobian shape error with FillArrays.Zeros vector HOT 12
- rand_tangent and zero-arrays.
- `to_vec(::Diagonal)`: densify or not?
- Should `to_vec(::Integer)` return an empty vector HOT 8
- investigate whether we can specialize less HOT 1
- Error if given nonfinite primal? HOT 2
- to_vec errors for StepRanges
- `to_vec` should make an empty vector for `CartesianIndex`
- gradient of function with Sparse Matrix fails:
- jā²vp and jacobian are not type-stable HOT 2
- the formulea for calculating derivatives of different error orders HOT 5
- Cross derivatives of a multivariate function? HOT 3
- `to_vec` should drop Bools
- max_range for single variables in multivariate functions HOT 3
- Type Conversion Error with Measurements HOT 1
- grad wraps result in a tuple HOT 4
- Mutation of input arguments HOT 3
- AD gradients of finite differences perform poorly HOT 1
- Argument limited to Functions HOT 3
- README gives wrong signature for VJP
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 finitedifferences.jl.