-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Add option to throw error on passing wrong precision floats to layers #2454
Comments
This seems like a good idea. Maybe it should literally be the same switch as That function belongs to GPUArraysCore, which Flux doesn't directly load right now, but NNlib does. |
When you say "same switch" do you mean defining something like |
I also think it makes sense to a function for enabling each of these checks separately. But having a |
Motivation and description
The warning about wrong precision is very helpful to point at potential performance issues
Flux.jl/src/layers/stateless.jl
Line 60 in 2f19e68
I think that this is the correct default behavior. However, in order to find out where the problem is coming from throwing an error to produce a stacktrace would be very helpful.
Possible Implementation
There could be a Preference or global flag that allows switching errors instead of warning for wrong precision inputs. This would also be made consistent with
CUDA.allowscalar
.The text was updated successfully, but these errors were encountered: