How to pass an h2o object to model in R using the h2o library




I am trying to use the h2o library in R for deep learning but I am unable to run the model:

mnist.hex = h2o.importFile(path = mnistPath, destination_frame = "mnist.hex")
train <-
train_h2o <- as.h2o(train)
#Training a deep learning model:
model <- h2o.deeplearning(x = 2:785,
                   y = 1,
                   data = train_h2o,
                   activation = "TanhWithDropout", 
                   input_dropout_ratio = 0.2,
                   hidden_dropout_ratios = c(0.5,0.5,0.5),
                   balance_classes = TRUE, 
                   hidden = c(50,50,50),
                   epochs = 100)

I am getting an error:

I have tried giving the mnist.hex as data but even that is not working.
Can someone please help me out on this


@hackers - You can look into this script in which h2o library is used

Hope this helps!