It’s 10X faster, but the process involved is not straightforward. Includes code changes (mostly boilerplate), hence this post.

As a first step, I just wanted to put together a simple model that compiles and provides some predictions. I chose the sentiment140 dataset on Kaggle. The dataset has 1.6 million tweets with positive and negative sentiment labels marked out. It is 288 MB in size, which is good for my purposes. The code I wrote to train the model is quite straightforward, as I was doing very basic preprocessing.

Training time — almost 1 hr 30 per epoch! Which is never going to work for an initial model. Time to test out the free TPU on offer on Colab.

#keras #nlp #google-cloud-platform #tpu #colab

How to Use TPUs on Google Colab with Keras
4.30 GEEK