#' @title Unroll the Deep Belief Net
#' @description Unrolling the DBN means stacking a reversed copy of itself. This create a (pre-trained) auto-encoder that can be
#' @param x the dbn object
#' @return the unrolled dbn with the \code{unrolled} switch is set to \code{TRUE}.
#' @examples
#' data(pretrained.mnist)
#' unrolled <- unroll(pretrained.mnist)
#' @importFrom methods is
#' @export
unroll <- function(x) {
if (is(x, "DeepBeliefNet")) {
return(unrollDbnCpp(x))
}
else {
stop("Expected a DeepBeliefNet")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.