-
-
Save RaphaelMeudec/68b997ba5dfb3abf66f74fd67baa4e3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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