【问题标题】:How to enable GPU accelration on H2O in Python?如何在 Python 中启用 H2O 上的 GPU 加速?
【发布时间】:2018-08-07 00:35:27
【问题描述】:

我正在尝试使用 Python 和 H2O 在我的 AWS 服务器上训练深度学习神经网络,我希望启用 GPU 加速来加快训练速度。请让我知道使用 GPU 而不是 CPU 的代码 sn-p。 AWS 使用 OpenGL。弹性 GPU 类型为 eg1.xlarge,内存为 4 GB。

我的模型的代码是:

nn = H2OGridSearch(model=H2ODeepLearningEstimator,
                               hyper_params = {
        'activation' :[ "Rectifier","Tanh","Maxout","RectifierWithDropout","TanhWithDropout","MaxoutWithDropout"],
        'hidden':[[20,20],[50,50],[30,30,30],[25,25,25,25]],            ## small network, runs faster
#        'rate' :[0.0005,0.001,0.0015,0.002,0.0025,0.003,0.0035,0.0040,0.0045,0.005],
         'l1':[0,1e-4,1e-6],
         'l2':[0,1e-4,1e-6]
        })

start_time = time.time()

nn.train(
        train1_x, train1_y,train1,
        score_validation_samples = 10000,      ## sample the validation dataset (faster)
        stopping_rounds = 2,
        stopping_metric ="MSE", ## alternatives: "MSE","logloss","r2"
        epochs=1000000,  
        stopping_tolerance = 0.01,
        max_w2 = 10
        )
end_time = time.time()

【问题讨论】:

    标签: python gpu h2o


    【解决方案1】:

    如果您有兴趣运行支持 GPU 的 H2O.ai 产品,H2O-3 仅支持 cpu,请参阅H2O4GPU 或 Driverless AI(注意:后者是封闭源代码)

    【讨论】:

      猜你喜欢
      • 2013-07-03
      • 2021-04-30
      • 2020-12-25
      • 2020-08-29
      • 2022-08-21
      • 2021-11-14
      • 2018-08-02
      • 2023-04-11
      • 2015-06-06
      相关资源
      最近更新 更多