Fix issue in Keras model complie with float64 mode (#19328)
* Fix issue in Keras model complie with float64 mode
This fix tries to address the issue raised in 19318 where
Keras model complie for `model.compile('rmsprop', 'mse')`
does not work in float64 mode.
The issue comes from `placeholder_with_default([1.]...`, which
returns dtype float32 by default (as `[1.]` was inteprated
as float32). Since placeholder does not have a output_dtype to pass,
this fix converts `[1.]` to float64 first before passing in.
This fix fixes 19318.
Signed-off-by:
Yong Tang <yong.tang.github@outlook.com>
* Fix pylint issue
Signed-off-by:
Yong Tang <yong.tang.github@outlook.com>
* Add test case for float64 and model compile
Signed-off-by:
Yong Tang <yong.tang.github@outlook.com>
Loading
Please sign in to comment