MSE-CNN Implementation 1
Code database with the implementation of MSE-CNN, from the paper 'DeepQTMT: A Deep Learning Approach for Fast QTMT-based CU Partition of Intra-mode VVC'
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
msecnn_raulkviana.msecnn.LossFunctionMSE Class Reference
Inheritance diagram for msecnn_raulkviana.msecnn.LossFunctionMSE:

Public Member Functions

 __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.
 

Public Attributes

 beta
 
 use_mod_cross_entropy
 
 MAX_RD
 
 MAX_LOSS
 
 last_loss
 
 last_pred
 
 last_RD
 

Constructor & Destructor Documentation

◆ __init__()

msecnn_raulkviana.msecnn.LossFunctionMSE.__init__ (   self,
  use_mod_cross_entropy = True,
  beta = 1 
)

Member Function Documentation

◆ forward()

msecnn_raulkviana.msecnn.LossFunctionMSE.forward (   self,
  pred,
  labels,
  RD 
)

This function implements the loss function.

Parameters
[in]predPredictions made by the model
[in]labelsGround-truth tensor
[in]RDRate distortion tensor
[out]lossVector 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]RDsTensor with RDs
[out]min_RDLowest 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]labelsGround truth tensor
[out]p_mTensor 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]tensorTensor with values
[out]tensorNew 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]RDsTensor with RDs
[in]max_valMax value to add
[out]clone_RDsTensor 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]tensorTensor with values
[in]max_valThreshold val
[in]subst_valMax value to replace the others
[out]tensorNew tensor

◆ remove_zero()

msecnn_raulkviana.msecnn.LossFunctionMSE.remove_zero (   self,
  RDs 
)

Substitutes the zeros values for big RD values.

Parameters
[in]RDsTensor with RDs
[out]RDsTensor With Max values added

Member Data Documentation

◆ 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: