rpudl {rpud}R Documentation

RPUDL Model of Deep Learning

Description

Creates an S3 object that represents a RPUDL model. It contains the necessary information for model training afterwards.

Usage

## Default S3 method:
rpudl(
    model.file, 
    data.source, 
    ..., 
    log.level = 1
    )

Arguments

model.file

path location of a text file that defines an RPUDL model in the codeprotobuf text format

data.source

a RPUDL object that represents the training and testing data

...

further arguments to be passed to or from methods

log.level

level of the method output (0 = silent, 1 = basic output, 2 = detailed output)

Details

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.

Value

An S3 rpudl object that represents an RPUDL model, containing:

model.file

path location of the RPUDL model in protobuf text format

model.spec

text description of the RPUDL model file in protobuf text format

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 LMDB database

test.data

name of the testing LMDB database

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

Author(s)

Chi Yau
chi.yau@r-tutor.com

See Also

rpudlCreateDataSource,
rpudlTrain,
rpudlPretrain,
predict.rpudl

Examples

## 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)

[Package rpud version 0.7.1 Index]