rev: Reverse a Deep Belief Net

Description Usage Arguments Value See Also Examples

Description

rev returns a reversed DeepBeliefNet object. Precisely, the output is converted into the input of the network, and conversely.

Usage

1
2
3
4
5
## S3 method for class 'DeepBeliefNet'
rev(x)

## S3 method for class 'RestrictedBolzmannMachine'
rev(x)

Arguments

x

the DeepBeliefNet to reverse

Value

the reversed DeepBeliefNet

See Also

RestrictedBolzmannMachine, DeepBeliefNet, rev

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
dbn <- DeepBeliefNet(Layers(c(784, 1000, 500, 250, 30), input="continuous", output="gaussian"))
reversed.dbn <- rev(dbn)
print(dbn)

# A reversed DBN can be used to predict, calculate errors, etc.
data(trained.mnist)
library(mnist)
data(mnist)
forward.error <- rmse(trained.mnist, mnist$test$x)
reverse.error <- rmse(rev(trained.mnist), mnist$test$x)
## Not run: plot.mnist(predictions = cbind(forward.error, reverse.error))
rbm <- RestrictedBolzmannMachine(Layer(784, "continuous"), Layer(1000, "gaussian"))
rev(rbm)
print(rbm)

xrobin/DeepLearning documentation built on Sept. 18, 2020, 5:23 a.m.