bubbliiiing / mobilenet-ssd-keras

这是一个mobilenet-ssd-keras的源码,可以用于训练自己的轻量级ssd模型。
MIT License
106 stars 34 forks source link

TypeError: Tensors are unhashable (this tensor: KerasTensor(type_spec=TensorSpec(shape=(None, 4), dtype=tf.float32, name=None), description="created by layer 'input_1'")). Instead, use tensor.ref() as the key. #21

Open stu-zhangxl opened 1 year ago

stu-zhangxl commented 1 year ago

Traceback (most recent call last): File "d:\work_paul\11_new_workspace\mobilenetssdv2_tf\v1\mobilenet-ssd-keras-master\predict.py", line 77, in r_image = ssd.detect_image(image, crop = crop, count=count) File "d:\work_paul\11_new_workspace\mobilenetssdv2_tf\v1\mobilenet-ssd-keras-master\ssd.py", line 124, in detect_image results = self.bbox_util.decode_box(preds, self.anchors, image_shape, File "d:\work_paul\11_new_workspace\mobilenetssdv2_tf\v1\mobilenet-ssd-keras-master\utils\utils_bbox.py", line 114, in decode_box idx = self.sess.run(self.nms, feed_dict={self.boxes: boxes_to_process, self.scores: confs_to_process}) File "D:\softwres\py\lib\site-packages\keras\engine\keras_tensor.py", line 268, in hash raise TypeError( TypeError: Tensors are unhashable (this tensor: KerasTensor(type_spec=TensorSpec(shape=(None, 4), dtype=tf.float32, name=None), description="created by layer 'input_1'")). Instead, use tensor.ref() as the key.

stu-zhangxl commented 1 year ago

请问这个issue该如何修正呢?

bubbliiiing commented 1 year ago

估计是版本吧