deepmd.pd.loss#
Submodules#
Classes#
Helper class that provides a standard way to create an ABC using | |
Helper class that provides a standard way to create an ABC using | |
Helper class that provides a standard way to create an ABC using |
Package Contents#
- class deepmd.pd.loss.EnergyHessianStdLoss(start_pref_h=0.0, limit_pref_h=0.0, **kwargs)[source]#
Bases:
EnergyStdLossHelper class that provides a standard way to create an ABC using inheritance.
- has_h#
- start_pref_h = 0.0#
- limit_pref_h = 0.0#
- forward(input_dict, model, label, natoms, learning_rate, mae=False)[source]#
Return loss on energy and force.
- Parameters:
- Returns:
- property label_requirement: list[deepmd.utils.data.DataRequirementItem]#
Add hessian label requirement needed for this loss calculation.
- class deepmd.pd.loss.EnergyStdLoss(starter_learning_rate=1.0, start_pref_e=0.0, limit_pref_e=0.0, start_pref_f=0.0, limit_pref_f=0.0, start_pref_v=0.0, limit_pref_v=0.0, start_pref_ae: float = 0.0, limit_pref_ae: float = 0.0, start_pref_pf: float = 0.0, limit_pref_pf: float = 0.0, relative_f: float | None = None, enable_atom_ener_coeff: bool = False, start_pref_gf: float = 0.0, limit_pref_gf: float = 0.0, numb_generalized_coord: int = 0, use_l1_all: bool = False, inference=False, use_huber=False, huber_delta=0.01, **kwargs)[source]#
Bases:
deepmd.pd.loss.loss.TaskLossHelper class that provides a standard way to create an ABC using inheritance.
- starter_learning_rate = 1.0#
- has_e#
- has_f#
- has_v#
- has_ae#
- has_pf#
- has_gf#
- start_pref_e = 0.0#
- limit_pref_e = 0.0#
- start_pref_f = 0.0#
- limit_pref_f = 0.0#
- start_pref_v = 0.0#
- limit_pref_v = 0.0#
- start_pref_ae = 0.0#
- limit_pref_ae = 0.0#
- start_pref_pf = 0.0#
- limit_pref_pf = 0.0#
- start_pref_gf = 0.0#
- limit_pref_gf = 0.0#
- relative_f = None#
- enable_atom_ener_coeff = False#
- numb_generalized_coord = 0#
- use_l1_all = False#
- inference = False#
- use_huber = False#
- huber_delta = 0.01#
- forward(input_dict, model, label, natoms, learning_rate, mae=False)[source]#
Return loss on energy and force.
- Parameters:
- Returns:
- property label_requirement: list[deepmd.utils.data.DataRequirementItem]#
Return data label requirements needed for this loss calculation.
- classmethod deserialize(data: dict) deepmd.pd.loss.loss.TaskLoss[source]#
Deserialize the loss module.
- Parameters:
- data
dict The serialized loss module
- data
- Returns:
LossThe deserialized loss module
- class deepmd.pd.loss.TaskLoss(**kwargs)[source]#
Bases:
paddle.nn.Layer,abc.ABC,make_plugin_registry('loss')Helper class that provides a standard way to create an ABC using inheritance.
- property label_requirement: list[deepmd.utils.data.DataRequirementItem]#
- Abstractmethod:
Return data label requirements needed for this loss calculation.