|
| | __init__ (self, pm, use_mod_cross_entropy=True, beta=1, alpha=0.5) |
| |
| | get_proportion_CUs (self, labels) |
| | This function returns the proportion of CU's for all the types of split mode.
|
| |
| | get_min_RDs (self, RDs) |
| | Obtain the lowest value that isnt zero from RDs tensor.
|
| |
| | remove_values_lower (self, tensor, max_val, subst_val) |
| | Remove values from tensor that are lower than a given value.
|
| |
| | remove_inf_values (self, tensor) |
| | Remove values from tensor that are inf and make them zeros.
|
| |
| | remove_zero (self, RDs) |
| | Substitutes the zeros values for big RD values.
|
| |
| | remove_values_above (self, RDs, max_val) |
| | Substitutes values above MAX_RD for the MAX_RD.
|
| |
| | forward (self, pred, labels, RD) |
| | This function implements the loss function.
|
| |
◆ __init__()
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.__init__ |
( |
|
self, |
|
|
|
pm, |
|
|
|
use_mod_cross_entropy = True, |
|
|
|
beta = 1, |
|
|
|
alpha = 0.5 |
|
) |
| |
◆ forward()
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.forward |
( |
|
self, |
|
|
|
pred, |
|
|
|
labels, |
|
|
|
RD |
|
) |
| |
This function implements the loss function.
- Parameters
-
| [in] | pred | Predictions made by the model |
| [in] | labels | Ground-truth tensor |
| [in] | RD | Rate distortion tensor |
| [out] | loss | Vector of raw predictions that a classification model generates |
◆ get_min_RDs()
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.get_min_RDs |
( |
|
self, |
|
|
|
RDs |
|
) |
| |
Obtain the lowest value that isnt zero from RDs tensor.
- Parameters
-
| [in] | RDs | Tensor with RDs |
| [out] | min_RD | Lowest value of RDs that isnt zero |
◆ get_proportion_CUs()
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.get_proportion_CUs |
( |
|
self, |
|
|
|
labels |
|
) |
| |
This function returns the proportion of CU's for all the types of split mode.
- Parameters
-
| [in] | labels | Ground truth tensor |
| [out] | p_m | Tensor with the proportions |
◆ remove_inf_values()
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.remove_inf_values |
( |
|
self, |
|
|
|
tensor |
|
) |
| |
Remove values from tensor that are inf and make them zeros.
- Parameters
-
| [in] | tensor | Tensor with values |
| [out] | tensor | New tensor |
◆ remove_values_above()
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.remove_values_above |
( |
|
self, |
|
|
|
RDs, |
|
|
|
max_val |
|
) |
| |
Substitutes values above MAX_RD for the MAX_RD.
- Parameters
-
| [in] | RDs | Tensor with RDs |
| [in] | max_val | Max value to add |
| [out] | clone_RDs | Tensor With Max values added |
◆ remove_values_lower()
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.remove_values_lower |
( |
|
self, |
|
|
|
tensor, |
|
|
|
max_val, |
|
|
|
subst_val |
|
) |
| |
Remove values from tensor that are lower than a given value.
- Parameters
-
| [in] | tensor | Tensor with values |
| [in] | max_val | Threshold val |
| [in] | subst_val | Max value to replace the others |
| [out] | tensor | New tensor |
◆ remove_zero()
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.remove_zero |
( |
|
self, |
|
|
|
RDs |
|
) |
| |
Substitutes the zeros values for big RD values.
- Parameters
-
| [in] | RDs | Tensor with RDs |
| [out] | RDs | Tensor With Max values added |
◆ alpha
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.alpha |
◆ beta
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.beta |
◆ last_loss
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.last_loss |
◆ last_pred
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.last_pred |
◆ last_RD
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.last_RD |
◆ MAX_LOSS
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.MAX_LOSS |
◆ MAX_RD
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.MAX_RD |
◆ pm
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.pm |
◆ use_mod_cross_entropy
| msecnn_raulkviana.msecnn.LossFunctionMSE_Ratios.use_mod_cross_entropy |
The documentation for this class was generated from the following file: