Я пытаюсь развернуть мою обученную модель керас в Google Cloud ML.Модель отлично работает на моей локальной машине, но не может быть развернута в облаке.Я работаю с библиотекой cloudml в RStudio на MacOS High Sierra (10.13.4).
Вот игрушечный пример:
model <- keras_model_sequential()
model %>%
layer_dense(units = 78, activation = "sigmoid", input_shape = c(39)) %>%
layer_dense(units = 39, activation = "sigmoid") %>%
layer_dense(units = 20, activation = "sigmoid") %>%
layer_dense(units = 1, activation = "sigmoid") %>%
compile(
loss = 'mean_squared_error',
optimizer = optimizer_rmsprop(),
metrics = c('mean_squared_error')
)
history <- model %>% fit(
x_train, y_train,
epochs = 1000,
validation_split = 0.2
)
# deploy
export_savedmodel(model, "model")
cloudml_deploy("model", name = "keras_model")
Вот моя информация о версии:
> R.Version()
$platform
[1] "x86_64-apple-darwin15.6.0"
$arch
[1] "x86_64"
$os
[1] "darwin15.6.0"
$system
[1] "x86_64, darwin15.6.0"
$status
[1] ""
$major
[1] "3"
$minor
[1] "4.1"
$year
[1] "2017"
$month
[1] "06"
$day
[1] "30"
$`svn rev`
[1] "72865"
$language
[1] "R"
$version.string
[1] "R version 3.4.1 (2017-06-30)"
$nickname
[1] "Single Candle"
Мой RStudio - версия 1.1.423.Версии локальных библиотек R:
cloudml: 0.5
keras: 2.1.6.9001
tensorflow: 1.5.0.9001
Я получаю сообщение об ошибке:
Creating version (this might take a few minutes)
..............................................
..............................................
..............................................
..............................................
..............................................
...........................failed.
ERROR: (gcloud.ml-engine.versions.create) Bad model
detected with error: "Failed to load model: Loading
servable: {name: default version: 1} failed: Not found:
Op type not registered 'ClipByValue' in binary running
on localhost. Make sure the Op and Kernel are registered
in the binary running in this process.\n\n (Error code: 0
Есть идеи, что случилось?