我尝试运行Google的AI说明图像示例。链接:https://colab.sandbox.google.com/github/GoogleCloudPlatform/ml-on-gcp/blob/master/tutorials/explanations/ai-explanations-image.ipynb
而且,我使用这些代码安装我的Google驱动器
from google.colab import drive
drive.mount('/content/gdrive')
然后,我通过以下方式将模型导出到我的Google云端硬盘:>
export_path = keras_estimator.export_saved_model( '/content/gdrive/My Drive/xai_flower/', serving_input_receiver_fn ).decode('utf-8')
但是当我想使用时
!gcloud beta ai-platform versions create $VERSION \ --model $MODEL \ --origin $export_path \ --runtime-version 1.14 \ --framework TENSORFLOW \ --python-version 3.5 \ --machine-type n1-standard-4 \ --explanation-method integrated-gradients \ --num-integral-steps 25
将输出
/bin/bash: /content/gdrive/My: No such file or directory ERROR: (gcloud.beta.ai-platform.versions.create) unrecognized arguments: Drive/xai_flower/1576834069
显然,gcloud存在用空间解析路径的问题。
我尝试用其他单词重命名“我的云端硬盘”,但似乎不可用。
我尝试运行Google的AI说明图像示例。链接:https://colab.sandbox.google.com/github/GoogleCloudPlatform/ml-on-gcp/blob/master/tutorials/explanations/ai-explanations-image.ipynb而且,...
请尝试使用反斜杠(\
)来转义路径中的空格,>]
export_path = keras_estimator.export_saved_model(
'/content/gdrive/My\ Drive/xai_flower/',
serving_input_receiver_fn
).decode('utf-8')