<jupyter_start><jupyter_text>It is really important to be able to reload the model after you've been training it for hours on end (usually).<jupyter_code>from keras.models import load_model

model.save('my_model.h5')

model2 = load_model('my_model.h5')
model2.evaluate_generator(test_gen, steps_per_epoch)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09253731343283582, 'fraction_numerical': 0.011940298507462687, 'mean_word_length': 7.842105263157895, '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': '420679', 'license': 'Apache-2.0', 'n_tokens_mistral': 120, 'n_tokens_neox': 115, 'n_words': 29, 'path': 'deepschool.io/Lesson 04 - Part 2 - Keras Neural Nets.ipynb', 'repo_name': 'gopala-kr/ds-notebooks', 'size': '335'}