ImageAI icon indicating copy to clipboard operation
ImageAI copied to clipboard

'CustomModelCheckpoint' object has no attribute '_implements_train_batch_hooks'

Open mamodo123 opened this issue 6 years ago • 1 comments

Hello, my code is:

`import tensorflow as tf tf.to_float = lambda x: tf.cast(x, tf.float32) tf.assign_add = tf.compat.v1.assign_add

from imageai.Detection.Custom import DetectionModelTrainer

trainer = DetectionModelTrainer() trainer.setModelTypeAsYOLOv3() trainer.setDataDirectory(data_directory='dataset') trainer.setTrainConfig(object_names_array=['wp', 'bp', 'board', 'tatic', 'question'], batch_size=4, num_experiments=100, train_from_pretrained_model="pretrained-yolov3.h5") trainer.trainModel() `

and i'm getting 'CustomModelCheckpoint' object has no attribute '_implements_train_batch_hooks';

tensorflow 2.3.1 keras 2.4.3

mamodo123 avatar Sep 30 '20 12:09 mamodo123

sorry for the late response. ImageAI has been updated to support Tensorflow 2.4.0

Visit the link below on updating to the latest version.

https://imageai.readthedocs.io/en/latest/index.html#installing-imageai

OlafenwaMoses avatar Jan 06 '21 21:01 OlafenwaMoses