rpudl {rpud} | R Documentation |
Creates an S3 object that represents a RPUDL
model.
It contains the necessary information for model training afterwards.
## Default S3 method:
rpudl(
model.file,
data.source,
...,
log.level = 1
)
model.file |
path location of a text file that defines
an |
data.source |
a |
... |
further arguments to be passed to or from methods |
log.level |
level of the method output (0 = silent, 1 = basic output, 2 = detailed output) |
An RPUDL
model is described in Google Protocol Buffers (protobuf
)
message format. The .proto file that defines the message type
is posted online at http://www.r-tutor.com.
The RPUDL
runtime supports save/resume incremental training,
and autoencoders for pre-training.
It uses LMDB
database as native data input format.
An S3 rpudl
object that represents an RPUDL
model, containing:
model.file |
path location of the |
model.spec |
text description of the |
data.format |
format of the data set |
data.dir |
path location of the data set |
data.shape |
the width and height of each data item |
data.channels |
number of channels of each data item |
train.data |
name of the training |
test.data |
name of the testing |
param.data |
parametric values of individual layers in the model |
mean.data |
mean value of the training data items |
model.classes |
number of classification classes of the model |
learning.rate |
manual override of the learning rate, ignored if zero or negative |
cost.log |
accumulative log of the model cost after each training iteration |
cost |
model cost evaluated against the test data |
loss |
prediction error ratio evaluated against the test data |
Chi Yau
chi.yau@r-tutor.com
rpudlCreateDataSource,
rpudlTrain,
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)