1.2.9
Does not matter
While importing tensorflowjs module in python3 (using Google Colab environment), I get the following error:
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
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
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
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
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
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'
`
You can try it on Google Colab.
https://colab.research.google.com/drive/1gftM84djEwrxNfgqbriIzxatI5S_p9aX
seems to be a bug , @pyu10055 can you please take a look ?
AttributeError: 'EnumTypeWrapper' object has no attribute 'DT_FLOAT'
Same problem
+1
I tried it with version 1.2.6 and it does not have this error. 1.2.9 has
pip install tensorflowjs==1.2.6 seems to fix this issue.
I believe this is fixed by this PR https://github.com/tensorflow/tfjs/commit/dd5d9ed60e9cadf0426304d5a470504fd9b6d44a
you should see the changes in next release.
on version 1.2.6 I get this error:
ValueError: tf.enable_eager_execution must be called at program startup.
"pip install tensorflowjs==1.2.6" worked for me, thanks
Most helpful comment
I tried it with version 1.2.6 and it does not have this error. 1.2.9 has