Next up is dropout layers
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include <tensor/matrix.hpp> // panic::tensor::real_matrix (uint_matrix, int_matrix)
|
||||
#include <tensor/vector.hpp>
|
||||
|
||||
#include <neural_network/layer/trainable_layer.hpp>
|
||||
|
||||
namespace panic{
|
||||
namespace neural_network{
|
||||
@@ -73,6 +74,11 @@ struct loss{
|
||||
*/
|
||||
panic::types::real_t data_loss = 0;
|
||||
|
||||
/**
|
||||
* @brief Regularization loss over a layer.
|
||||
*/
|
||||
panic::types::real_t regularization_loss_value = 0;
|
||||
|
||||
/**
|
||||
* @brief Gradient with respect to the loss input.
|
||||
*
|
||||
@@ -172,6 +178,15 @@ struct loss{
|
||||
const panic::tensor::real_matrix& y_pred,
|
||||
const panic::tensor::real_matrix& y_true);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Caclculates the regularization loss of a trainable layer
|
||||
*
|
||||
*/
|
||||
bool regularization_loss(const trainable_layer& layer);
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user