import tensorflow as tf
a=tf.int32
b=tf.constant(3)
a==b
gives error instead of giving 'false'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/dtypes.py", line 248, in __eq__
and self._type_enum == as_dtype(other).as_datatype_enum)
File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/dtypes.py", line 536, in as_dtype
if key == type_value:
TypeError: data type not understood
Why does this produce an error. I'm using tensorflow 0.8 Shouldn't one be able to check equality b/w any variables.
What I was trying to achieve was checking if an object is present in a list
a=tf.int32
b=[tf.constant(3),..other objects]
if a in b:
do_something()