Skip to content

Instantly share code, notes, and snippets.

@xrobin
Last active August 29, 2015 14:04
Show Gist options
  • Save xrobin/68142df3a8afcd85cb5f to your computer and use it in GitHub Desktop.
Save xrobin/68142df3a8afcd85cb5f to your computer and use it in GitHub Desktop.
install.packages(c("Rcpp", "plotrix", "RcppEigen", "BH", "devtools"))
library("devtools")
install_github(repo = "mnist", username = "xrobin", ref = "master")
install_github(repo = "DeepLearning", username = "xrobin", ref = "master")
my.diag.function <- function(rbm, batch, data, iter, batchsize, maxiters, layerFromCpp) {
print(iter)
}
library(mnist)
library(DeepLearning)
initial.dbn <- DeepBeliefNet(Layers(c(784, 1000, 500, 250, 2), input="cont", output="gaussian"))
pretrained <- pretrain(initial.dbn[[1]], mnist$train$x,
diag.function = my.diag.function, diag.rate = "accelerate")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment