Loading...
Searching...
No Matches
Classes |
Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Attributes |
List of all members
opennn::Loss Class Reference
#include <opennn/training/loss.h>
Classes | |
| struct | EvaluationResult |
Public Types | |
| enum class | Error { MeanSquaredError , MeanAbsoluteError , NormalizedSquaredError , WeightedSquaredError , CrossEntropy , CrossEntropy3d , MinkowskiError , Yolo } |
| enum class | Regularization { L1 , L2 , NoRegularization } |
Static Public Member Functions | |
| static const EnumMap< Regularization > & | regularization_map () |
| static const string & | regularization_to_string (Regularization regularization) |
| static Regularization | string_to_regularization (const string &name) |
Protected Attributes | |
| Error | error = Error::MeanSquaredError |
| float | normalization_coefficient = 1.0f |
| float | positives_weight = 1.0f |
| float | negatives_weight = 1.0f |
| Index | weighted_samples_number = 0 |
| float | minkowski_parameter = 1.5f |
| float | yolo_lambda_giou = 5.0f |
| float | yolo_lambda_dfl = 1.5f |
| float | yolo_lambda_noobj = 0.5f |
| float | yolo_lambda_class = 1.0f |
| float | yolo_focal_gamma = 0.0f |
| float | yolo_obj_focal_gamma = 0.0f |
| Regularization | regularization_method = Regularization::NoRegularization |
| float | regularization_weight = 0.001f |
| Network * | network = nullptr |
| Dataset * | dataset = nullptr |
| string | name = "Loss" |
Member Enumeration Documentation
◆ Error
|
strong |
◆ Regularization
|
strong |
Constructor & Destructor Documentation
◆ Loss()
◆ ~Loss()
|
virtualdefault |
Member Function Documentation
◆ add_regularization_gradient() [1/2]
| void opennn::Loss::add_regularization_gradient | ( | BackPropagation & | ) | const |
◆ add_regularization_gradient() [2/2]
| void opennn::Loss::add_regularization_gradient | ( | const TensorView & | ) | const |
◆ back_propagate()
| void opennn::Loss::back_propagate | ( | const Batch & | , |
| ForwardPropagation & | , | ||
| BackPropagation & | ) const |
◆ back_propagate_device_metrics()
| bool opennn::Loss::back_propagate_device_metrics | ( | const Batch & | , |
| ForwardPropagation & | , | ||
| BackPropagation & | , | ||
| float * | , | ||
| float * | ) const |
◆ calculate_error()
| EvaluationResult opennn::Loss::calculate_error | ( | const Batch & | , |
| const ForwardPropagation & | ) const |
◆ calculate_error_device_metrics()
| bool opennn::Loss::calculate_error_device_metrics | ( | const Batch & | , |
| const ForwardPropagation & | , | ||
| float * | , | ||
| float * | ) const |
◆ calculate_regularization() [1/2]
| float opennn::Loss::calculate_regularization | ( | const TensorView & | ) | const |
◆ calculate_regularization() [2/2]
| float opennn::Loss::calculate_regularization | ( | const VectorR & | ) | const |
◆ from_JSON()
| void opennn::Loss::from_JSON | ( | const JsonDocument & | ) |
◆ get_dataset() [1/2]
|
inline |
◆ get_dataset() [2/2]
|
inlinenoexcept |
◆ get_error()
|
inlinenoexcept |
◆ get_name()
|
inlinenoexcept |
◆ get_network() [1/2]
|
inline |
◆ get_network() [2/2]
|
inlinenoexcept |
◆ get_output_delta_layer_indices()
| vector< Index > opennn::Loss::get_output_delta_layer_indices | ( | ) | const |
◆ get_regularization_method()
|
inline |
◆ output_delta_overwrites_outputs()
| bool opennn::Loss::output_delta_overwrites_outputs | ( | ) | const |
◆ regularization_from_JSON()
| void opennn::Loss::regularization_from_JSON | ( | const JsonDocument & | ) |
◆ regularization_map()
|
inlinestatic |
◆ regularization_to_JSON()
| void opennn::Loss::regularization_to_JSON | ( | JsonWriter & | ) | const |
◆ regularization_to_string()
|
inlinestatic |
◆ set()
◆ set_dataset()
|
inlinevirtual |
◆ set_error() [1/2]
| void opennn::Loss::set_error | ( | const Error & | ) |
◆ set_error() [2/2]
| void opennn::Loss::set_error | ( | const string & | ) |
◆ set_minkowski_parameter()
|
inline |
◆ set_network()
|
inline |
◆ set_normalization_coefficient()
| void opennn::Loss::set_normalization_coefficient | ( | ) |
◆ set_regularization() [1/2]
|
inline |
◆ set_regularization() [2/2]
|
inline |
◆ set_regularization_weight()
|
inline |
◆ set_yolo_focal_gamma()
|
inline |
◆ set_yolo_lambda_class()
|
inline |
◆ set_yolo_lambda_dfl()
|
inline |
◆ set_yolo_lambda_giou()
|
inline |
◆ set_yolo_lambda_noobj()
|
inline |
◆ set_yolo_obj_focal_gamma()
|
inline |
◆ string_to_regularization()
|
inlinestatic |
◆ supports_device_epoch_metrics()
| bool opennn::Loss::supports_device_epoch_metrics | ( | ) | const |
◆ to_JSON()
| void opennn::Loss::to_JSON | ( | JsonWriter & | ) | const |
Member Data Documentation
◆ dataset
|
protected |
◆ error
|
protected |
◆ minkowski_parameter
|
protected |
◆ name
|
protected |
◆ negatives_weight
|
protected |
◆ network
|
protected |
◆ normalization_coefficient
|
protected |
◆ positives_weight
|
protected |
◆ regularization_method
|
protected |
◆ regularization_weight
|
protected |
◆ weighted_samples_number
|
protected |
◆ yolo_focal_gamma
|
protected |
◆ yolo_lambda_class
|
protected |
◆ yolo_lambda_dfl
|
protected |
◆ yolo_lambda_giou
|
protected |
◆ yolo_lambda_noobj
|
protected |
◆ yolo_obj_focal_gamma
|
protected |