Skip to content

Instantly share code, notes, and snippets.

@RaphaelMeudec
Last active March 20, 2018 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RaphaelMeudec/68b997ba5dfb3abf66f74fd67baa4e3d to your computer and use it in GitHub Desktop.
Save RaphaelMeudec/68b997ba5dfb3abf66f74fd67baa4e3d to your computer and use it in GitHub Desktop.
for epoch in range(epoch_num):
print('epoch: {}/{}'.format(epoch, epoch_num))
print('batches: {}'.format(x_train.shape[0] / batch_size))
# Randomize images into batches
permutated_indexes = np.random.permutation(x_train.shape[0])
for index in range(int(x_train.shape[0] / batch_size)):
batch_indexes = permutated_indexes[index*batch_size:(index+1)*batch_size]
image_blur_batch = x_train[batch_indexes]
image_full_batch = y_train[batch_indexes]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment