rstudio / cloudml

R interface to Google Cloud Machine Learning Engine
https://tensorflow.rstudio.com/tools/cloudml/
65 stars 24 forks source link

deploy model with custom layer #186

Open Tixierae opened 5 years ago

Tixierae commented 5 years ago

Hi, and thank you for the great package!

when using export_savedmodel, which is the first step listed on the CloudML Deploying Models step-by-step instructions, I receive an error ValueError: Unknown layer: AttentionWithContext. AttentionWithContext is a custom layer that my model is using.

Since many users use custom layers, it would be very helpful to address this issue. Maybe using an approach similar to, e.g., Keras' custom_objects? See https://keras.io/getting-started/faq/#handling-custom-layers-or-other-custom-objects-in-saved-models

If a solution already exists, any help/advice would be highly appreciated.