0

I have a question on using tensorflow on google cloud platform.

I heard that Google cloud tensorflow doesnt support Keras (keras.io). However, now i can see that Tensorflow has its own API to access Keras (https://www.tensorflow.org/api_docs/python/tf/contrib/keras).

Given this, can I use the above mentioned API inside google cloud, since it is coming out along with Tensorflow package? Any idea sir?

I am able to access this API from the tensorflow installed on a anaconda machine.

Doubt Dhanabalu
  • 457
  • 4
  • 8
  • 18

3 Answers3

1

Option 1# Please try package-path option. As per the docs... -package-path=PACKAGE_PATH "Path to a Python package to build. This should point to a directory containing the Python source for the job" Try and give a relative path to keras from your main script.

More details here: https://cloud.google.com/sdk/gcloud/reference/beta/ml-engine/local/train

Option 2# If you have a setup.py file Inside your setup.py file within setup call pass argument install_requires=['keras']

sunil manikani
  • 320
  • 1
  • 11
0

Google Cloud Machine Learning Engine does support Keras (keras.io), but you have to list it as a dependency when starting a training job. For some specific instructions, see this SO post, or a longer exposition on this blog page. If you'd like to serve your model on Google Cloud Machine Learning or using TensorFlow Serving, then see this SO post about exporting your model.

That said, you can also use tf.contrib.keras, as long as you use the --runtime-version=1.2 flag. Just keep in mind that packages in contrib are experimental and may introduce breaking API changes between versions.

rhaertel80
  • 8,254
  • 1
  • 31
  • 47
0

Have a look at this example on git which I saw was recenly added: Keras Cloud ML Example

Jan Krynauw
  • 1,042
  • 10
  • 21