'EnumTypeWrapper' object has no attribute 'DT_FLOAT' while importing in Python 3
See original GitHub issueTensorFlow.js version
1.2.9
Browser version
Does not matter
Describe the problem or feature request
While importing tensorflowjs module in python3 (using Google Colab environment), I get the following error:
`--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-6-4aa5f30b4c2f> in <module>() 1 from google.colab import drive 2 from google.colab import files ----> 3 import tensorflowjs as tfjs 4 5 drive.mount(‘/content/gdrive’)
4 frames /usr/local/lib/python3.6/dist-packages/tensorflowjs/init.py in <module>() 19 20 # pylint: disable=unused-imports —> 21 from tensorflowjs import converters 22 from tensorflowjs import quantization 23 from tensorflowjs import version
/usr/local/lib/python3.6/dist-packages/tensorflowjs/converters/init.py in <module>() 22 from tensorflowjs.converters.keras_tfjs_loader import deserialize_keras_model 23 from tensorflowjs.converters.keras_tfjs_loader import load_keras_model —> 24 from tensorflowjs.converters.tf_saved_model_conversion_v2 import convert_tf_saved_model
/usr/local/lib/python3.6/dist-packages/tensorflowjs/converters/tf_saved_model_conversion_v2.py in <module>() 39 from tensorflowjs.converters import common 40 from tensorflowjs.converters import fold_batch_norms —> 41 from tensorflowjs.converters import fuse_prelu 42 43 # enable eager execution for v2 APIs
/usr/local/lib/python3.6/dist-packages/tensorflowjs/converters/fuse_prelu.py in <module>() 198 prelu_fn(tf.constant(1.0), tf.constant(1.0)) 199 –> 200 register_prelu_op()
/usr/local/lib/python3.6/dist-packages/tensorflowjs/converters/fuse_prelu.py in register_prelu_op() 40 41 value = attr_value_pb2.AttrValue() —> 42 value.list.type.extend([types_pb2.DataType.DT_FLOAT]) 43 attr = op_def_pb2.OpDef.AttrDef() 44 attr.name = ‘T’
AttributeError: ‘EnumTypeWrapper’ object has no attribute ‘DT_FLOAT’ `
Code to reproduce the bug / link to feature request
You can try it on Google Colab. https://colab.research.google.com/drive/1gftM84djEwrxNfgqbriIzxatI5S_p9aX
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:8
Top GitHub Comments
pip install tensorflowjs==1.2.6
seems to fix this issue.I tried it with version 1.2.6 and it does not have this error. 1.2.9 has