<commit_before>'''Train a simple deep CNN on the CIFAR10 small images dataset using
a triangular cyclic learning rate (CLR) policy.
It gets to 75% validation accuracy in 15 epochs, and 79% after 40 epochs;
compare to 25 and 50 epochs respectively without CLR.
'''

from __future__ import print_function
from __future__ import absolute_import
import keras
from keras.datasets import cifar10
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras_contrib.callbacks import CyclicLR

import os

batch_size = 100
num_classes = 10
data_augmentation = True
num_predictions = 20
data_augmentation = True
save_dir = os.path.join(os.getcwd(), 'saved_models')
model_name = 'keras_cifar10_trained_model.h5'

# The data, split between train and test sets:
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
print('x_train shape:', x_train.shape)<commit_msg>Fixed example script<commit_after>'''Train a simple deep CNN on the CIFAR10 small images dataset using
a triangular cyclic learning rate (CLR) policy.
It gets to 75% validation accuracy in 15 epochs, and 79% after 40 epochs;
compare to 25 and 50 epochs respectively without CLR.
'''

from __future__ import print_function
from __future__ import absolute_import
import keras
from keras.datasets import cifar10
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras_contrib.callbacks import CyclicLR

import os

batch_size = 100
epochs = 50
num_classes = 10
data_augmentation = True
num_predictions = 20
data_augmentation = True
save_dir = os.path.join(os.getcwd(), 'saved_models')
model_name = 'keras_cifar10_trained_model.h5'

# The data, split between train and test sets:
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
print('x_train shape:', x_train.shape)
{'fraction_non_alphanumeric': 0.0683046683046683, 'fraction_numerical': 0.030466830466830467, 'mean_word_length': 6.069444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6851489', 'n_tokens_mistral': 698, 'n_tokens_neox': 625, 'n_words': 229}