【问题标题】:Yolo v3 in Tensorflow 2.xTensorFlow 2.x 中的 Yolo v3
【发布时间】: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,但没有任何效果。

关于如何解决此问题的提示?

【问题讨论】:

标签: tensorflow object-detection tensorflow2.0 yolo


【解决方案1】:

如果你只是想要一个使用 tensorflow 2.X 的 yolo,你可能想试试这个版本: https://github.com/hunglc007/tensorflow-yolov4-tflite

实现已经完成,用scrcipt将模型转换为tflite和tftrt,但是你可以按原样运行。

【讨论】:

  • 不,我打算克服所有概念上的挑战来试验可变大小的模型,但从没想过框架会带来这样的问题。我希望改变架构并尝试使用特定领域的数据进行训练。
猜你喜欢
  • 2019-11-08
  • 2018-12-10
  • 2021-09-15
  • 1970-01-01
  • 2020-11-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-08-24
相关资源
最近更新 更多