R/unroll.R

Defines functions unroll

Documented in unroll

#' @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")
	}
}
xrobin/DeepLearning documentation built on Sept. 18, 2020, 5:23 a.m.