Next up is dropout layers
This commit is contained in:
@@ -205,10 +205,12 @@ struct model{
|
||||
*
|
||||
* @note This function is convenient, but it allocates a new layer.
|
||||
*/
|
||||
bool add_layer_dense(
|
||||
panic::types::uint_t input_size,
|
||||
panic::types::uint_t neuron_count
|
||||
);
|
||||
bool add_layer_dense(panic::types::uint_t input_size,
|
||||
panic::types::uint_t neurons,
|
||||
panic::types::real_t weight_regularizer_l1 = 0,
|
||||
panic::types::real_t weight_regularizer_l2 = 0,
|
||||
panic::types::real_t bias_regularizer_l1 = 0,
|
||||
panic::types::real_t bias_regularizer_l2 = 0);
|
||||
|
||||
/**
|
||||
* @brief Adds a activation ReLU layer to the model.
|
||||
@@ -412,6 +414,18 @@ struct model{
|
||||
*/
|
||||
bool optimize();
|
||||
|
||||
/**
|
||||
* @brief Calculates regulaization for parameters on trainable layers
|
||||
*
|
||||
* Computes:
|
||||
* @code
|
||||
* model.calculate_regularization_loss()
|
||||
* @endcode
|
||||
*
|
||||
* @return true if optimization is done correctly.
|
||||
*
|
||||
*/
|
||||
bool calculate_regularization_loss(panic::types::real_t& regularization_loss);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user