【问题标题】:Is non-max suppression done on GPU on Tensorflow?是否在 Tensorflow 上的 GPU 上进行了非最大抑制?
【发布时间】:2018-02-12 02:26:26
【问题描述】:
tf.image.non_max_suppression 

Tensorflow 提供了这种方法用于非最大抑制,不知道 tensorflow 是否提供 GPU 支持?

【问题讨论】:

标签: python tensorflow object-detection


【解决方案1】:

答案是。如果你尝试:

boxes = np.random.uniform(size=(100, 4))
scores = np.random.uniform(size=(100,))

bx = tf.constant(boxes, dtype=tf.float32)
sc = tf.constant(scores, dtype=tf.float32)

with tf.device("gpu:0"):
    indx = tf.image.non_max_suppression(bx, sc, 1000)

你会看到:

    NotFoundError: No registered 'NonMaxSuppressionV3' OpKernel for GPU devices compatible with node {{node NonMaxSuppressionV3}} = NonMaxSuppressionV3[T=DT_FLOAT](dummy_input, dummy_input, dummy_input, dummy_input, dummy_input)
    .  Registered:  device='CPU'; T in [DT_HALF]
  device='CPU'; T in [DT_FLOAT]
 [Op:NonMaxSuppressionV3]

【讨论】:

    猜你喜欢
    • 2017-08-10
    • 1970-01-01
    • 1970-01-01
    • 2013-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-06
    • 2017-07-20
    相关资源
    最近更新 更多