【发布时间】:2020-06-29 09:21:20
【问题描述】:
在过去的几周里,我一直试图让 Yolo v3 在 TF 2.x 中工作,每次我解决一个问题时,都会出现另一个问题。主要挑战是实际上让 TensorFlow 为每个尺度执行 NonMaxSuppression,并在训练集中进行采样。我用了tf.image.non_max_suppression_padded,被打到了
Tensorflow.python.framework.errors_impl.OperatorNotAllowedInGraphError: using a `tf.Tensor` as a Python `bool` is not allowed in Graph execution. Use Eager execution or decorate this function with @tf.function.
我通过禁用急切执行来解决这个问题,并移动到Model(input, output),但这次我被击中了
tensorflow.python.framework.errors_impl.InternalError: Tensorflow type 21 not convertible to numpy dtype
我尝试堆叠 TensorArray(是的,TensorArray,因为我必须循环遍历批次中的每个比例和样本),转换为 Tensor,但没有任何效果。
关于如何解决此问题的提示?
【问题讨论】:
-
你可能想看看下面的 repo,它使用 TF 2.x 实现了 YOLOv3:github.com/zzh8829/yolov3-tf2
标签: tensorflow object-detection tensorflow2.0 yolo