rpudlPlotLayerWeights {rpud} | R Documentation |
Plotting the weight parameters of a layer element
in an RPUDL
model.
rpudlPlotLayerWeights(obj)
obj |
S3 object that inherits the class |
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.
Chi Yau
chi.yau@r-tutor.com
rpudl,
rpudlTrain,
rpudlGetLayerWeights
## 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)