1

我按照这个使用命令的快速入门教程使用TPU 启动了一个实例,ctpu up并且我能够成功运行 MNIST 教程。我退出云外壳并使用 SSH 控制台登录到连接到 TPU 的虚拟机,如此所述,当我再次运行 MNIST 教程时,我得到了

RuntimeError: Cannot find any TPU cores in the system. Please double check Tensorflow master address and TPU worker(s).

当我跑步时ctpu ls,我得到

#       Flock Name      Status
0:      my-tpu(*)  running

ctpu status命令给出

Your cluster is running!
Compute Engine VM:  RUNNING
Cloud TPU:          RUNNING

我在这里缺少一些基本的东西吗?

4

1 回答 1

1

ctpu将此名称作为环境变量 ( TPU_NAME) 传递给 Compute Engine 虚拟机,但gcloud不会。

明确指定您的 TPU:使用--tpu=my-tpu而不是--tpu=$TPU_NAME

于 2019-03-21T01:01:04.517 回答