Google Colab
colab.research.google.com › notebooks › MNISTPreprocessing Data. Each image of the MNIST dataset is encoded in a 784 dimensional vector, representing a 28 x 28 pixel image. Each pixel has a value between 0 and 255, corresponding to the grey-value of a pixel. The above featch_mldata method to load MNIST returns data and target as uint8 which we convert to float32 and int64 respectively.
Google Colab
colab.research.google.com › mnist-trainingOn the main menu, click Runtime and select Change runtime type. Set "TPU" as the hardware accelerator. The cell below makes sure you have access to a TPU on Colab. [ ] ↳ 0 cells hidden. [ ] import os. assert os.environ ['COLAB_TPU_ADDR'], 'Make sure to select TPU from Edit > Notebook settings > Hardware accelerator'.