是否可以使用 GPU 训练 H2O 模型并使用 CPU 进行预测?
Is it possible to train a H2O model with GPU and predict with a CPU?
对于训练速度,如果能够使用 GPU 训练 H2O 模型,获取模型文件,然后在没有 GPU 的机器上进行预测,那就太好了。
这似乎在理论上应该是可能的,但是对于 H2O 版本 3.13.0.341,这似乎不会发生,除了 XGBoost 模型。
当我 运行 gpustat -cup
训练 H2O 的 XGBoost 模型时,我可以看到 GPU 启动。这不会发生在 DL、DRF、GLM 或 GBM 中。
如果浮点大小(16、32、64)的差异会导致一些不一致,我不会感到惊讶,更不用说多处理器建模导致的变幻莫测,但我认为我可以接受。
(这与我在这里的问题有关,但现在我对环境有了更好的了解,我发现 GPU 并不是一直都在使用。)
How can I tell if H2O 3.11.0.266 is running with GPUs?
新XGBoost integration in H2O is the only GPU-capable algorithm in H2O (proper) at this time. So you can train an XGBoost model on GPUs and score on CPUs, but that's not true for the other H2O algorithms。
还有H2O Deep Water project, which provides integration between H2O and three third-party deep learning backends (MXNet, Caffe and TensorFlow), all of which are GPU-capable. So you can train those models using a GPU and score on a CPU as well. You can download the H2O Deep Water jar file (or R package, or Python module) at the Deep Water link above, and you can find out more info in the Deep Water GitHub repo README。
是的,您在 GPU 上完成了繁重的训练工作,保存了权重,然后,您的 CPU 将只进行矩阵乘法预测。
在 Keras 中,您可以训练模型并保存神经网络权重:
model.save_weights('your_model_weights.h5')
model.load_weights('your_model_weights.h5')
对于训练速度,如果能够使用 GPU 训练 H2O 模型,获取模型文件,然后在没有 GPU 的机器上进行预测,那就太好了。
这似乎在理论上应该是可能的,但是对于 H2O 版本 3.13.0.341,这似乎不会发生,除了 XGBoost 模型。
当我 运行 gpustat -cup
训练 H2O 的 XGBoost 模型时,我可以看到 GPU 启动。这不会发生在 DL、DRF、GLM 或 GBM 中。
如果浮点大小(16、32、64)的差异会导致一些不一致,我不会感到惊讶,更不用说多处理器建模导致的变幻莫测,但我认为我可以接受。
(这与我在这里的问题有关,但现在我对环境有了更好的了解,我发现 GPU 并不是一直都在使用。)
How can I tell if H2O 3.11.0.266 is running with GPUs?
新XGBoost integration in H2O is the only GPU-capable algorithm in H2O (proper) at this time. So you can train an XGBoost model on GPUs and score on CPUs, but that's not true for the other H2O algorithms。
还有H2O Deep Water project, which provides integration between H2O and three third-party deep learning backends (MXNet, Caffe and TensorFlow), all of which are GPU-capable. So you can train those models using a GPU and score on a CPU as well. You can download the H2O Deep Water jar file (or R package, or Python module) at the Deep Water link above, and you can find out more info in the Deep Water GitHub repo README。
是的,您在 GPU 上完成了繁重的训练工作,保存了权重,然后,您的 CPU 将只进行矩阵乘法预测。
在 Keras 中,您可以训练模型并保存神经网络权重:
model.save_weights('your_model_weights.h5')
model.load_weights('your_model_weights.h5')