Export Model to Google Cloud Storage

The following snippet allows you to export your model to Google Storage on the Google Cloud Platform using gcloud commands.


In [0]:
# Set your BUCKET name based on the project to guarantee that it is unique
PROJECT = !gcloud config get-value project
BUCKET = PROJECT[0] + '-bucket'

In [0]:
# Make the Google storage bucket
!gsutil mb gs://{BUCKET}

In [0]:
# Copy over your servable model to the bucket
!gsutil -m cp -r <keras_servable | estimator_servable> gs://{BUCKET}/