不能让深水在TF上运行MBP

时间:2017-06-05 21:41:04

标签: tensorflow h2o

我正试图让R + deepwater + tensorflow在MBP上运行。

已安装以下内容。

Python 3.6.1
TensorFlow 1.1

TensorFlow网站上的Hello, TensorFlow示例工作正常。

R version 3.4.0

curl -O http://h2o-release.s3.amazonaws.com/h2o/master/3904/R/src/contrib/h2o_3.11.0.3904.tar.gz
R CMD INSTALL h2o_3.11.0.3904.tar.gz

curl -O http://s3.amazonaws.com/h2o-deepwater/public/nightly/latest/h2o_3.11.0.tar.gz
R CMD INSTALL h2o_3.11.0.tar.gz

我正在尝试运行h2o网站上提供的以下示例。

require(h2o)

h2o.init()

train <- h2o.importFile("https://h2o-public-test-data.s3.amazonaws.com/bigdata/laptop/mnist/train.csv.gz")

target <- "C785"
features <- setdiff(names(train), target)

train[target] <- as.factor(train[target])

model <- h2o.deepwater(x=features, y=target, training_frame=train, epochs=100, activation="Rectifier",
    hidden=c(200,200), ignore_const_cols=FALSE, mini_batch_size=256, input_dropout_ratio=0.1, 
    hidden_dropout_ratios=c(0.5,0.5), stopping_rounds=3, stopping_tolerance=0.05, 
    stopping_metric="misclassification", score_interval=2, score_duty_cycle=0.5, score_training_samples=1000, 
    score_validation_samples=1000, nfolds=5, gpu=FALSE, seed=1234, backend="tensorflow")

我得到的错误是Error: java.lang.RuntimeException: Unable to initialize backend: Cannot find TensorFlow native library for OS: darwin, architecture: x86_64.根据我在SO和git页面上看到的内容,我的印象是不需要为Mac平台构建。

我尝试的另一件事是使用https://github.com/rstudio/tensorflow中的信息。当我运行install_tensorflow()时,我得到Error: Prerequisites for installing TensorFlow not available.请帮忙!

1 个答案:

答案 0 :(得分:0)

我们不为MacOS提供H2O +深水构建。您下载的是为Linux机器(在Ubuntu上测试)构建的,它提到on the download page

如果您想在MacOS上运行它,您必须自己构建DeepWater然后H2O