Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/344.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 是否在Tensorflow上的GPU上执行非最大值抑制?_Python_Tensorflow_Object Detection - Fatal编程技术网

Python 是否在Tensorflow上的GPU上执行非最大值抑制?

Python 是否在Tensorflow上的GPU上执行非最大值抑制?,python,tensorflow,object-detection,Python,Tensorflow,Object Detection,Tensorflow为非最大值抑制提供了这种方法,我想知道Tensorflow是否提供了GPU支持?答案是否。如果您尝试: tf.image.non_max_suppression 你会看到: boxes = np.random.uniform(size=(100, 4)) scores = np.random.uniform(size=(100,)) bx = tf.constant(boxes, dtype=tf.float32) sc = tf.constant(scores, dt

Tensorflow为非最大值抑制提供了这种方法,我想知道Tensorflow是否提供了GPU支持?

答案是。如果您尝试:

tf.image.non_max_suppression 
你会看到:

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]