I am trying to train a multi-scale CNN some kind like YOLOv2 in Tensorflow: to randomly resize the batch of inputs every several epochs. But I am not so familiar with Tensorflow, the following is how I get batches of images and labels:
data_provider = slim.dataset_data_provider.DatasetDataProvider(dataset)
image, label = data_provider.get(['image', 'label'])
inputs, labels = tf.train.shuffle_batch([image, label], \
batch_size=128, \
num_threads=4, \
capacity= 1000, \
min_after_dequeue=616)
Then I hope I can resize the batch of inputs and feed into network
rand_size=int(np.random.uniform(0.15,1)*720)
resize_output = tf.image.resize_bilinear(preprocessed_inputs, [rand_size,rand_size],align_corners=True)
Unfortunately, it does not work, it only resize the batch at the beginning, and apply the resize operation to all the inputs
Anyone have suggestions for what I should do? Thanks a lot