|
| __init__ (self, use_mod_cross_entropy=True, beta=1) |
|
| 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.__init__ |
( |
|
self, |
|
|
|
use_mod_cross_entropy = True , |
|
|
|
beta = 1 |
|
) |
| |
◆ forward()
msecnn_raulkviana.msecnn.LossFunctionMSE.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.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.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.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.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.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.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 |
◆ beta
msecnn_raulkviana.msecnn.LossFunctionMSE.beta |
◆ last_loss
msecnn_raulkviana.msecnn.LossFunctionMSE.last_loss |
◆ last_pred
msecnn_raulkviana.msecnn.LossFunctionMSE.last_pred |
◆ last_RD
msecnn_raulkviana.msecnn.LossFunctionMSE.last_RD |
◆ MAX_LOSS
msecnn_raulkviana.msecnn.LossFunctionMSE.MAX_LOSS |
◆ MAX_RD
msecnn_raulkviana.msecnn.LossFunctionMSE.MAX_RD |
◆ use_mod_cross_entropy
msecnn_raulkviana.msecnn.LossFunctionMSE.use_mod_cross_entropy |
The documentation for this class was generated from the following file: