Open LifengWang opened 6 months ago
The standard neural network works well with mixed precision but the Bayesian neural network failed.
@LifengWang,
Thanks for reporting the issue. I have reproduced the behavior, please see gist for reference.
I'm not sure if in general we expect all examples to run under mixed precision without error. That will often depend on the custom layers/models created by the author in a given example.
But if anyone has interest in diving in here and fixing this up, contributions are welcome!
This issue is stale because it has been open for 180 days with no activity. It will be closed if no further activity occurs. Thank you.
Issue Type
Bug
Source
binary
Keras Version
2.16.0
Custom Code
No
OS Platform and Distribution
Linux Ubuntu 20.04
Python version
3.10
GPU model and memory
No response
Current Behavior?
bayesian_neural_networks example works well with the default fp32 data type when using the legacy keras.
While when I enable the mixed precision for bfloat16 or float16 with the following code. bayesian_neural_networks example failed.
Standalone code to reproduce the issue or tutorial link
Relevant log output