fwdNN {dnn} | R Documentation |
Feed forward and back propagation for dnn Models
Description
{fwdNN} is an R function for feed forward network.
Usage
fwdNN(X, model)
#
# to calculate a feed feedward model
#
Arguments
X |
For "dNNmodel", X is a design matrix of dimension n * p. |
model |
a model return from dNNmodel function. |
Details
'cache' is the cache of each input layer, will be used in the bwdNN function.
Value
The function fwdNN return a list containing at least the following components:
cache |
a list contains the values of each output layer after activation function transformation and adding the intercept term (i.e. the bias term). The intercept does not add to the output layer in the cache. |
Author(s)
Bingshu E. Chen (bingshu.chen@queensu.ca)
See Also
bwdNN
,
plot.dNNmodel
,
print.dNNmodel
,
summary.dNNmodel
,
Examples
### define a dnn model, calculate the feed forward network
model = dNNmodel(units = c(8, 6, 1), activation = c("elu", "sigmoid", "sigmoid"),
input_shape = 3)
### feed forward with a dummy x matrix
x = matrix(runif(15), nrow = 5, ncol = 3)
cache = fwdNN(x, model)
[Package dnn version 0.0.6 Index]