2

我写了一个 NN 模型,它分析图像并在最后提取 8 个浮点数。该模型在我的计算机上运行良好(但速度很慢),所以我在 TPU 云上试了一下,然后 BAM!我有一个错误:

I1008 12:58:47.077905 140221679261440 tf_logging.py:115] 从 training_loop 记录的错误:文件系统方案“[本地]”未实现(文件:“/home/gcloud_iba/Data/CGTR/model/GA_subset/model.ckpt-0_temp_e840841d93124a67b54074b1c1c ') [[{{节点保存/SaveV2}} = SaveV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT64], _device="/job:worker /replica:0/task:0/device:CPU:0"](save/ShardedFilename, save/SaveV2/tensor_names, save/SaveV2/shape_and_slices, batch_normalization/beta/Read/ReadVariableOp, batch_normalization/beta/Momentum/Read_1/ReadVariableOp ,batch_normalization/gamma/Read/ReadVariableOp,batch_normalization/gamma/Momentum/Read_1/ReadVariableOp,batch_normalization/moving_mean/Read/ReadVariableOp,batch_normalization/moving_variance/Read/ReadVariableOp、batch_normalization_1/beta/Read/ReadVariableOp、batch_normalization_1/beta/Momentum/Read_1/ReadVariableOp、batch_normalization_1/gamma/Read/ReadVariableOp、batch_normalization_1/gamma/Momentum/Read_1/ReadVariableOp、batch_normalization_1/moving_mean/Read/ ReadVariableOp、batch_normalization_1/moving_variance/Read/ReadVariableOp、conv2d/kernel/Read/ReadVariableOp、conv2d/kernel/Momentum/Read_1/ReadVariableOp、conv2d_1/kernel/Read/ReadVariableOp、conv2d_1/kernel/Momentum/Read_1/ReadVariableOp、conv2d_2/kernel/读取/ReadVariableOp, conv2d_2/kernel/Momentum/Read_1/ReadVariableOp, conv2d_3/kernel/Read/ReadVariableOp, conv2d_3/kernel/Momentum/Read_1/ReadVariableOp, conv2d_4/kernel/Read/ReadVariableOp, conv2d_4/kernel/Momentum/Read_1/ReadVariableOp, conv2d_5/kernel/Read/ReadVariableOp,conv2d_5/kernel/Momentum/Read_1/ReadVariableOp, conv2d_6/kernel/Read/ReadVariableOp, conv2d_6/kernel/Momentum/Read_1/ReadVariableOp, conv2d_7/kernel/Read/ReadVariableOp, conv2d_7/kernel/Momentum/Read_1/ReadVariableOp, conv2d_8/kernel/读取/ReadVariableOp、conv2d_8/kernel/Momentum/Read_1/ReadVariableOp、conv2d_9/kernel/Read/ReadVariableOp、conv2d_9/kernel/Momentum/Read_1/ReadVariableOp、dense/bias/Read/ReadVariableOp、dense/bias/Momentum/Read_1/ReadVariableOp、密集/内核/读取/ReadVariableOp,密集/内核/Momentum/Read_1/ReadVariableOp,密集_1/bias/Read/ReadVariableOp,密集_1/bias/Momentum/Read_1/ReadVariableOp,密集_1/内核/读取/ReadVariableOp,密集_1/内核/Momentum/ Read_1/ReadVariableOp、dense_2/bias/Read/ReadVariableOp、dense_2/bias/Momentum/Read_1/ReadVariableOp、dense_2/kernel/Read/ReadVariableOp、dense_2/kernel/Momentum/Read_1/ReadVariableOp、dense_3/bias/Read/ReadVariableOp、dense_3/bias/Momentum/Read_1/ReadVariableOp、dense_3/kernel/Read/ReadVariableOp、dense_3/kernel/Momentum/Read_1/ReadVariableOp、global_step/Read/读取变量操作)]]

我检查了 TPU 是否可以访问硬盘并且它可以工作(我有另一段代码可以读取与另一个模型相同的数据集)。我还没有缓存我的数据,但我做了一些预取。除此之外,我看不出什么不起作用?

感谢您提供的任何帮助!

皮尔

4

2 回答 2

3

本地文件系统在 Cloud TPU 上不可用。模型目录(检查点等)和输入数据应存储在 Google Cloud Storage 中(并以“gs://”为前缀)。

更多细节在这里

https://cloud.google.com/tpu/docs/storage-buckets

于 2018-10-17T17:54:42.460 回答
1

如果没有 Google Cloud Storage,请使用 Keras API ( https://keras.io/ ) 编写模型。

于 2018-10-18T18:35:04.177 回答