I am trying to train the MNIST dataset using deepenet package's dbn.dnn.train function. The task is a classification one. I am using the following command
dbn.deepnet <- dbn.dnn.train(train.image.data,train.image.labels,hidden=c(5,5))
The problems I am facing are:
1) The labels should be factor type vector. But when i input the labels as factor the function gives an error that "y should be a matrix or vector". So, I am using labels as numeric. How to proceed for a classification task
2) What it the function to make the predictions for dbn.dnn.train. I am using nn.predict but the documentation mentions that the input should be neural network trained by function nn.train (dbn.dnn.train is not mentioned). The output is 0.9986 for all records
nn.predict(dbn.deepnet,train.image.data)