ReconstructRBM: Reconstruct RBM

Description Usage Arguments Value Examples

Description

Reconstructs an input image with a trained RBM or stacked RBM.

Usage

1
ReconstructRBM(test, model, layers = 1)

Arguments

test

A test example to reconstruct, works only with one example.

model

A model trained with either the RBM or StackRBM function.

layers

The number of layers that was used for training the StackRBM function.

Value

A plot of the original and reconstructed image (model) side by side.

Examples

1
2
3
4
5
6
7
8
# Load MNIST data
data(MNIST)

# Fit unsupervised RBM 
mod <- RBM(MNIST$trainX, n.iter = 1000, n.hidden = 100)

# Reconstruct a training image
ReconstructRBM(MNIST$testX[6, ], model = mod)

TimoMatzen/RBM documentation built on June 1, 2019, 8:35 a.m.