rpudlTrain {rpud} | R Documentation |
Optimizes a RPUDL
deep learning model with training data.
rpudlTrain(
model,
learning.rate = 0,
batch.size = 128,
iterations = 128,
display = 100,
top.n = 1,
seed = 0,
...,
log.level = 1
)
model |
a |
learning.rate |
manual override of the learning rate, ignored if zero or negative |
batch.size |
the size of a data batch for each training iteration |
iterations |
maximum number of training iterations |
display |
a logical to display training progress |
top.n |
a classification predict is considered an error if its top n results are all incorrect |
seed |
seed of random number generation |
... |
further arguments to be passed to or from methods |
log.level |
level of the method output (0 = silent, 1 = basic output, 2 = detailed output) |
The optimization training process supports the following algorithms:
Stochastic Gradient Descent
RMSProp
AdaGrad
Adam
A new rpudl
object with trained parameters.
Chi Yau
chi.yau@r-tutor.com
rpudl,
rpudlPretrain,
predict.rpudl
## Not run:
# create data source
ds <- rpudlCreateDataSource(
data.format="lmdb",
data.dir="data/mnist",
train.data="mnist-official-data_train_lmdb",
test.data="mnist-official-data_test_lmdb",
data.shape=c(28, 28)
)
# create model
model <- rpudl(
"mnist_mpl_lenet.prototxt",
data.source=ds
)
# train model
model <- rpudlTrain(model, batch=100, iter=1000)
## End(Not run)