setup | R Documentation |
nn_module
to use with luzThe setup function is used to set important attributes and method for nn_modules
to be used with luz.
setup(module, loss = NULL, optimizer = NULL, metrics = NULL, backward = NULL)
module |
( |
loss |
( |
optimizer |
( |
metrics |
( |
backward |
( |
It makes sure the module have all the necessary ingredients in order to be fitted.
A luz module that can be trained with fit()
.
It also adds a device
active field that can be used to query the current
module device
within methods, with eg self$device
. This is useful when
ctx()
is not available, eg, when calling methods from outside the luz
wrappers. Users can override the default by implementing a device
active
method in the input module
.
Other training:
evaluate()
,
fit.luz_module_generator()
,
predict.luz_module_fitted()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.