<jupyter_start><jupyter_text>We want to see the loss and accuracy<jupyter_code>model.evaluate(X_test, y_test)<jupyter_output>10000/10000 [==============================] - 1s 110us/sample - loss: 0.8542 - acc: 0.7061<jupyter_text>Let's go to TPU<jupyter_code>TPU_WORKER = 'grpc://' + os.environ['COLAB_TPU_ADDR']
tf.logging.set_verbosity(tf.logging.INFO)
tpu_model = tf.contrib.tpu.keras_to_tpu_model(
model,
strategy=tf.contrib.tpu.TPUDistributionStrategy(
tf.contrib.cluster_resolver.TPUClusterResolver(TPU_WORKER)))
tpu_model.fit(
    X_train, y_train,
    batch_size=128*8,
    epochs=20,
    validation_split=0.2
)
tpu_model.evaluate(X_test, y_test)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.04678362573099415, 'mean_word_length': 7.0588235294117645, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '108243', 'license': 'MIT', 'n_tokens_mistral': 303, 'n_tokens_neox': 278, 'n_words': 34, 'path': 'Step2/cifar10.ipynb', 'repo_name': 'baczynska/DW_5challenge', 'size': '684'}