<jupyter_start><jupyter_text>Creating a model with only 2 epochs<jupyter_code># using ten epochs for the training and saving the accuracy for each epoch
epochs = 2
history = model.fit(X_train, y_train, batch_size=32, epochs=epochs,
                    validation_data=(X_val, y_val))

# Display of the accuracy and the loss values
import matplotlib.pyplot as plt

plt.figure(0)
plt.plot(history.history['accuracy'], label='training accuracy')
plt.plot(history.history['val_accuracy'], label='val accuracy')
plt.title('Accuracy')
plt.xlabel('epochs')
plt.ylabel('accuracy')
plt.legend()

plt.figure(1)
plt.plot(history.history['loss'], label='training loss')
plt.plot(history.history['val_loss'], label='val loss')
plt.title('Loss')
plt.xlabel('epochs')
plt.ylabel('loss')
plt.legend()

model.save("./models/Test_Model_2epoch.h5")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1478463329452852, 'fraction_numerical': 0.009313154831199068, 'mean_word_length': 6.413793103448276, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '652898', 'license': 'MIT', 'n_tokens_mistral': 314, 'n_tokens_neox': 293, 'n_words': 64, 'path': 'testing.ipynb', 'repo_name': 'mh-8man/Traffic_Sign_Recognition', 'size': '859'}