我的目标是为数据增强目的引入随机缩放和转换。为什么`tf.image.resize_images`设置图像形状?
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
不是?
我结束了内联'random_crop'并做了小的修改,并且像魅力一样工作。谢谢! – Clash