OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.64k stars 2.19k forks source link

TypeError: Tensor is unhashable. Instead, use tensor.ref() as the key. #558

Open luisvivasg opened 4 years ago

luisvivasg commented 4 years ago

Hi.

I am trying to train the model ImageAI but I get this error.

I was previously getting the error regarding the floatt AttributeError: module 'tensorflow' has no attribute 'to_float'

and it was fixed with the code below.

import tensorflow as tf tf.to_float = lambda x: tf.cast(x, tf.float32)

How can I fix TypeError: Tensor is unhashable. Instead, use tensor.ref() as the key.

I am using Tensorflow 2.x that is on Kaggle.

Tahnks.

Jitendra-Nathawat commented 4 years ago

use tensorflow 1.13.1 gpu, its solve ypur problem , imageAi is not comfortable with tensorflow 2.0 , so use the lower version of tensorflow.