Description Super class Methods Author(s)
R6 class representing a fully connected layer.
R6 class representing a fully connected layer.
modello::module
-> module.fc
new()
The initialisation method sets the weights (W), the bais (B) matrices, the activation function (act), as well as the name of the module. The calculation performed is the following ans = act(W.op(X) + B)
module.fc$new(tx, nin, nout, act)
tx
if TRUE it traspose the input matrix
nin
number of column of the input matrix
nout
number of hidden units
act
activation function to adopt
Returns the total number of parameters
op()
Performs: ans = act(W.op(X) + B)
module.fc$op(X)
X
input matrix, reference object of class 'number'
Returns a reference object of class 'number'
pars()
Returns the parameters of the module as list with entries: W = weight matrix, and B = bias matrix
module.fc$pars()
Returns a flat list with the parametrs of the module
clone()
The objects of this class are cloneable with this method.
module.fc$clone(deep = FALSE)
deep
Whether to make a deep clone.
Filippo Monari
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.