Generate the explicit code for a NN in Monolix
nn_generator_mlx(
number,
state,
n_hidden = 5,
act = "ReLU",
time_nn = FALSE,
beta = 20
)Explicit NN code in Monolix as list of lines in Monolix model file
(string) Name of the NN
(string) State to be used as input of the NN
(numeric) Number of units in the hidden layer; currently not implemented for the NN function
(string) Activation function to be used in the hidden layer of the NN (currently ReLU and Softplus implemented), default is ReLU
(boolean) If NN should be set up specifically as a time-dependent NN with strictly negative weights from input to hidden layer through w'=-w^2
(numeric) Beta value for the Softplus activation function, only applicable if act="Softplus"; Default to 20.
Dominic Bräm
Structure of one unit in the hidden layer:
h1 = max(0,W1 * state + b1)
h2 = max(0,W2 * state + b2)
...
NN = h1 + h2 + ...