You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3,6 +3,7 @@
"""
from tensorflow import keras
+from tensorflow.keras import backend as K
import logging
import inspect
import collections
@@ -48,6 +49,8 @@
:param change_ordering: change ordering to HWC (experimental)
:return: Keras model
"""
+ K.set_floatx('float64')+
# Use channels first format by default.
keras_fmt = keras.backend.image_data_format()
keras.backend.set_image_data_format('channels_first')
However I'm posting this here merely as a hardcoded workaround, so this still should be addressed properly by someone who actually understands how the converter works.
I don't know whether this issue is actually with this project (the "pytorch2onnx" part) or rather onnx2keras. Please move it if applicable.
Describe the bug
I'm trying to convert a model that uses double (float64) datatype throughout, it looks like this, created with
torch.jit.script
.Expected behavior
double -> double
Script
The text was updated successfully, but these errors were encountered: