![](/img/trans.png)
[英]How to connect to Google Cloud Platform Data Storage from Google Cloud AI Jupyter Notebook(Python)?
[英]Google Cloud Platform AI Notebook - how to ensure GPU is being used?
我在 GCP 上使用 Jupyter(通過 AI 平台設置簡單的方法)從scikit-garden
訓練MondrianForestRegressor
。 我的數據集大約為 450000 x 300,並且使用機器按原樣進行訓練,即使使用並行性n_jobs=-1
(32 個 CPU,208GB RAM)也比我想要的慢得多。
我附加了一個 GPU(2x NVIDIA Tesla T4),重新啟動實例並再次嘗試。 訓練速度似乎不受此更改的影響。
When creating a Notebook it allocates a GCE VM instance and a GPU, to monitor the GPU you should install the GPU metrics reporting agent on each VM instance that has a GPU attached, this will collect GPU data and sends it to StackDriver Monitoring
此外,還有兩種使用 GPU 的方法:
高級估算器 API:只要您的 ClusterSpec 配置正確,就無需更改代碼。 如果集群是 CPU 和 GPU 的混合體,則 map 將 ps 作業名稱分配給 CPU,將工作作業名稱分配給 GPU。
核心 TensorFlow API:您必須分配操作才能在支持 GPU 的機器上運行。 此過程與在本地使用具有 TensorFlow 的 GPU 相同。 您可以使用 tf.train.replica_device_setter 將操作分配給設備。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.