TensorFlow 不适用于带有 R 的 h2o
TensorFlow doesn't work in h2o with R
我已经使用 deepwater 构建了最新的 h2o 版本 (3.11.0.99999),但在使用 TensorFlow 后端 运行 h2o.deepwater 之后出现错误。
这是我的代码:
model_tf<-h2o.deepwater(x=2:ncol(train),
y=1,
backend = "tensorflow",
training_frame = train
)
这是错误:
java.lang.RuntimeException: Unable to initialize the native Deep Learning backend: resource mlp_1093x1x1_32.meta not found.
java.lang.RuntimeException: Unable to initialize the native Deep Learning backend: resource mlp_1093x1x1_32.meta not found.
at hex.deepwater.DeepWaterModelInfo.setupNativeBackend(DeepWaterModelInfo.java:259)
at hex.deepwater.DeepWaterModelInfo.(DeepWaterModelInfo.java:206)
at hex.deepwater.DeepWaterModel.(DeepWaterModel.java:227)
at hex.deepwater.DeepWater$DeepWaterDriver.buildModel(DeepWater.java:131)
at hex.deepwater.DeepWater$DeepWaterDriver.computeImpl(DeepWater.java:118)
at hex.ModelBuilder$Driver.compute2(ModelBuilder.java:173)
at hex.deepwater.DeepWater$DeepWaterDriver.compute2(DeepWater.java:111)
at water.H2O$H2OCountedCompleter.compute(H2O.java:1240)
at jsr166y.CountedCompleter.exec(CountedCompleter.java:468)
at jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:263)
at jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:974)
at jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1477)
at jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
Error: java.lang.RuntimeException: Unable to initialize the native Deep Learning backend: resource mlp_1093x1x1_32.meta not found.
相同的代码,但后端 "mxnet" 运行良好。
正如所指出的 here 此功能确实适用于最新的 H2O-3 和 DeepWater,您确实需要从源代码构建两者(或使用我们的 docker 图像)并安装 tar.gz
R包。
旧的 DeepWater 版本将不起作用,因为我们只为某些类型的 MLP 模型生成 TF 模型。
我已经使用 deepwater 构建了最新的 h2o 版本 (3.11.0.99999),但在使用 TensorFlow 后端 运行 h2o.deepwater 之后出现错误。
这是我的代码:
model_tf<-h2o.deepwater(x=2:ncol(train),
y=1,
backend = "tensorflow",
training_frame = train
)
这是错误:
java.lang.RuntimeException: Unable to initialize the native Deep Learning backend: resource mlp_1093x1x1_32.meta not found.
java.lang.RuntimeException: Unable to initialize the native Deep Learning backend: resource mlp_1093x1x1_32.meta not found. at hex.deepwater.DeepWaterModelInfo.setupNativeBackend(DeepWaterModelInfo.java:259) at hex.deepwater.DeepWaterModelInfo.(DeepWaterModelInfo.java:206) at hex.deepwater.DeepWaterModel.(DeepWaterModel.java:227) at hex.deepwater.DeepWater$DeepWaterDriver.buildModel(DeepWater.java:131) at hex.deepwater.DeepWater$DeepWaterDriver.computeImpl(DeepWater.java:118) at hex.ModelBuilder$Driver.compute2(ModelBuilder.java:173) at hex.deepwater.DeepWater$DeepWaterDriver.compute2(DeepWater.java:111) at water.H2O$H2OCountedCompleter.compute(H2O.java:1240) at jsr166y.CountedCompleter.exec(CountedCompleter.java:468) at jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:263) at jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:974) at jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1477) at jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
Error: java.lang.RuntimeException: Unable to initialize the native Deep Learning backend: resource mlp_1093x1x1_32.meta not found.
相同的代码,但后端 "mxnet" 运行良好。
正如所指出的 here 此功能确实适用于最新的 H2O-3 和 DeepWater,您确实需要从源代码构建两者(或使用我们的 docker 图像)并安装 tar.gz
R包。
旧的 DeepWater 版本将不起作用,因为我们只为某些类型的 MLP 模型生成 TF 模型。