s.colab_tpu.setup_tpu()
import jax


	Copied
num_devices = jax.device_count()
device_type = jax.devices()[0].device_kind

print(f"Found {num_devices} JAX devices of type {device_type}.")
assert (
    "TPU" in device_type
), "Available device is not a TPU, please select TPU from Edit > Notebook settings > Hardware accelerator"


	Copied
Found 8 JAX devices of type Cloud TPU.
Then we import all the dependencies.


	Copied
import numpy as np
impor