Reputation: 1
I'm just getting started with deep learning with R and am trying to figure out how to train a keras model on a Google Cloud GPU using the cloudml package.
I've been playing with the Nietzsche text generation example from here - https://keras.rstudio.com/articles/examples/lstm_text_generation.html - and it runs fine on my local machine but, unfortunately, doesn't execute properly when I try to run it using the cloudml package.
I saved the example code as "nietzsche_eg.R" and then ran the following code -
library (cloudml)
options (gcloud.binary.path="C:/Users/taman/AppData/Local/Google/CloudSDK/google-cloud-sdk/bin/gcloud")
options (gsutil.binary.path="C:/Users/taman/AppData/Local/Google/CloudSDK/google-cloud-sdk/bin/gsutil")
cloudml_train ("nietzsche_eg.R", master_type = "standard_p100")
Unfortunately, I get the following error -
Error: ValueError: Layer lstm_1 was called with an input that isn't a symbolic tensor. Received type: <class 'keras.engine.sequential.Sequential'>. Full input: [<keras.engine.sequential.Sequential object at 0x7f64b3b75610>]. All inputs to the layer should be tensors. Detailed traceback: File "/usr/local/lib/python2.7/dist-packages/keras/layers/recurrent.py", line 500, in __call__ return super(RNN, self).__call__(inputs, **kwargs) File "/usr/local/lib/python2.7/dist-packages/keras/engine/base_layer.py", line 414, in __call__ self.assert_input_compatibility(inputs) File "/usr/local/lib/python2.7/dist-packages/keras/engine/base_layer.py", line 285, in assert_input_compatibility str(inputs) + '. All inputs to the layer '
Any help or insight into what's going wrong is much appreciated. Thank you!
Upvotes: 0
Views: 94
Reputation: 4166
You are reading the input text file from Google cloud storage and not via http, right? The cloudmle workers can not reach out outside the Google data center.
Upvotes: 0