ValueError: Tried to convert ‘min_object_covered’ to a tensor and failed. Error:

ValueError: Tried to convert ‘min_object_covered’ to a tensor and failed. Error: None values not supported. 的错误。
是因为tensorflow的API发生变化,代码需要调整。
原来
bbox_begin, bbox_size, _ = tf.image.sample_distorted_bounding_box(tf.shape(image), bounding_boxes=bbox)

调整为:
bbox_begin, bbox_size, _ = tf.image.sample_distorted_bounding_box(tf.shape(image), bounding_boxes=bbox,min_object_covered=0.1)

猜你喜欢

转载自java-007.iteye.com/blog/2404690