mxnet
mxnet copied to clipboard
Question about random crop in ImageRecordIter
I always get the same result at two random crops of the same Image when using ImageRecorder. I've found a similar issue(closed) but I can't figure out how to get the correct result.
Some of my codes:
train_iter = mx.io.ImageRecordIter(
path_imgrec='/path/to/svhn_train.rec',
data_shape=(3,15,15),
batch_size= 2,
random_crop=True
)
train_iter.reset()
data = train_iter.next().data[0].asnumpy().astype(np.uint8)
for i in range(2):
X = data[i]
X = X.transpose((1,2,0))
plt.imshow(X)
plt.show()
train_iter.reset()
data = train_iter.next().data[0].asnumpy().astype(np.uint8)
for i in range(2):
X = data[i]
X = X.transpose((1,2,0))
plt.imshow(X)
plt.show()