Google colaboratory 如何在Google Colab中查找TPU名称和区域?

Google colaboratory 如何在Google Colab中查找TPU名称和区域?,google-colaboratory,google-cloud-tpu,Google Colaboratory,Google Cloud Tpu,我正在尝试运行一段代码,该代码要求配置中有tpu名称和区域 使用TPU运行时,如何在Google Colab中找到TPU名称和区域?Google Colab不公开TPU名称或其区域。 但是,您可以使用以下代码段获取TPU IP: tpu = tf.distribute.cluster_resolver.TPUClusterResolver() print('Running on TPU ', tpu.cluster_spec().as_dict())

我正在尝试运行一段代码,该代码要求配置中有tpu名称和区域


使用TPU运行时,如何在Google Colab中找到TPU名称和区域?

Google Colab不公开TPU名称或其区域。 但是,您可以使用以下代码段获取TPU IP:

tpu = tf.distribute.cluster_resolver.TPUClusterResolver()
print('Running on TPU ', tpu.cluster_spec().as_dict())