【发布时间】:2016-03-08 09:57:48
【问题描述】:
我的目标是为数据增强目的引入随机缩放和转换。
distorted_image = tf.image.resize_images(distorted_image, random_scale, random_scale)
distorted_image = tf.image.crop_to_bounding_box(distorted_image, random_y, random_x, 299, 299)
这失败了 'image' must be fully defined. 换行有效,但没有做我真正需要的。
distorted_image = tf.image.crop_to_bounding_box(distorted_image, random_y, random_x, 299, 299)
distorted_image = tf.image.resize_images(distorted_image, random_scale, random_scale)
所以看起来 resize_images 失去了图像张量的形状,然后crop_to_bouding_box 失败了。这是故意的,我错过了什么吗?为什么random_crop 在调整大小后可以工作,而crop_to_bounding_box 却不行?
【问题讨论】:
标签: tensorflow