【问题标题】:h2o deeplearning checkpoint modelh2o 深度学习检查点模型
【发布时间】:2015-12-31 03:49:54
【问题描述】:

伙计们,

尝试从检查点模型提供验证框架恢复 R 中的 h2o 深度学习时遇到一些问题。它说“验证数据集必须与检查点模型相同”,我相信我确实有相同的验证数据集。如果我将validation_frame 留空,则检查点模型可以正常工作。我在下面附上我的代码:

localh2o <- h2o.init(nthreads = -1)
train_image.hex <- read.csv("mnist_train.csv",header=FALSE)
train_image.hex[,785] <- factor(train_image.hex[,785])
train_image.hex <- as.h2o(train_image.hex)
test_image.hex <- read.csv("mnist_test.csv",header=FALSE)
test_image.hex[,785] <- factor(test_image.hex[,785])
test_image.hex <- as.h2o(test_image.hex)


mnist_model <- h2o.deeplearning(x=1:784, y = 785,
training_frame= train_image.hex, 
validation_frame = test_image.hex,
activation = "RectifierWithDropout", hidden = c(500,1000),
input_dropout_ratio = 0.2,
hidden_dropout_ratios = c(0.5,0.5), adaptive_rate=TRUE,
rho=0.98, epsilon = 1e-7,
l1 = 1e-8, l2 = 1e-7, max_w2 = 10, 
epochs = 10, export_weights_and_biases = TRUE,
variable_importances = FALSE
)
h2o.saveModel(mnist_model, path="/tmp",force=TRUE)

然后我关闭 h2o,退出 R 并在 R 中重新启动 h2o 以恢复训练,其中 h2o 出错:

localh2o <- h2o.init(nthreads = -1)
train_image.hex <- read.csv("mnist_train.csv",header=FALSE)
train_image.hex[,785] <- factor(train_image.hex[,785])
train_image.hex <- as.h2o(train_image.hex)
test_image.hex <- read.csv("mnist_test.csv",header=FALSE)
test_image.hex[,785] <- factor(test_image.hex[,785])
test_image.hex <- as.h2o(test_image.hex)
startmodel <- h2o.loadModel("/tmp/DeepLearning_model_R_1443812402059_20", localh2o)

mnist_model <- h2o.deeplearning(x=1:784, y = 785,
checkpoint = startmodel@model_id,
training_frame= train_image.hex, 
validation_frame = test_image.hex,
activation = "RectifierWithDropout", hidden = c(500,1000),
input_dropout_ratio = 0.2,
hidden_dropout_ratios = c(0.5,0.5), adaptive_rate=TRUE,
rho=0.98, epsilon = 1e-7,
l1 = 1e-8, l2 = 1e-7, max_w2 = 10, 
epochs = 10, export_weights_and_biases = TRUE,
variable_importances = FALSE
)

【问题讨论】:

    标签: deep-learning h2o checkpointing


    【解决方案1】:

    感谢您向我们指出这一点。我添加了一个 JIRA,你可以在这里跟踪它的进度:https://0xdata.atlassian.net/browse/PUBDEV-2182

    您可以期待问题很快得到解决。

    谢谢!

    Avni

    【讨论】:

      【解决方案2】:

      请使用最新版本重试。现在应该可以了。

      【讨论】:

      • 请提供其他上下文,例如版本号、更改日志摘录等。
      猜你喜欢
      • 1970-01-01
      • 2017-06-15
      • 2016-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-26
      • 2018-10-27
      相关资源
      最近更新 更多