簡體   English   中英

使用cloudml訓練R Keras模型失敗

[英]Training R Keras Model using cloudml fails

我剛剛開始使用R進行深度學習,並試圖弄清楚如何使用cloudml軟件包在Google Cloud GPU上訓練keras模型。

我一直在從這里玩Nietzsche文本生成示例-https: //keras.rstudio.com/articles/examples/lstm_text_generation.html-它在我的本地計算機上運行良好,但是不幸的是,在以下情況下無法正確執行我嘗試使用cloudml包運行它。

我將示例代碼保存為“ nietzsche_eg.R”,然后運行以下代碼-

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")

不幸的是,我收到以下錯誤-

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 ' 

非常感謝您對問題的任何幫助或見解。 謝謝!

您是從Google雲端存儲中讀取輸入文本文件,而不是通過http,不是嗎? 工作人員無法在Google數據中心之外進行聯系。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM