rpudlPlotLayerWeights {rpud}R Documentation

Plots of Weights in a Layer Element

Description

Plotting the weight parameters of a layer element in an RPUDL model.

Usage

rpudlPlotLayerWeights(obj)

Arguments

obj

S3 object that inherits the class rpudl.weights

Details

There is a separate plot for each individual output channel. The plot is monochrome if there is only one input channel, in RGB color if there are three input channels. The plot is not available if the number of input channels is other than one or three.

Author(s)

Chi Yau
chi.yau@r-tutor.com

See Also

rpudl,
rpudlTrain,
rpudlGetLayerWeights

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)

# extract weights
weights <- rpudlGetLayerWeights(model, "conv1"); str(weights)

# plot weights
library(gg2plot)
rpudlPlotLayerWeights(weights)

## End(Not run)

[Package rpud version 0.7.2 Index]