deepmd.pt.loss.dos#

Classes#

DOSLoss

Helper class that provides a standard way to create an ABC using

Module Contents#

class deepmd.pt.loss.dos.DOSLoss(starter_learning_rate: float, numb_dos: int, start_pref_dos: float = 1.0, limit_pref_dos: float = 1.0, start_pref_cdf: float = 1000, limit_pref_cdf: float = 1.0, start_pref_ados: float = 0.0, limit_pref_ados: float = 0.0, start_pref_acdf: float = 0.0, limit_pref_acdf: float = 0.0, inference=False, **kwargs)[source]#

Bases: deepmd.pt.loss.loss.TaskLoss

Helper class that provides a standard way to create an ABC using inheritance.

starter_learning_rate[source]#
numb_dos[source]#
inference = False[source]#
start_pref_dos = 1.0[source]#
limit_pref_dos = 1.0[source]#
start_pref_cdf = 1000[source]#
limit_pref_cdf = 1.0[source]#
start_pref_ados = 0.0[source]#
limit_pref_ados = 0.0[source]#
start_pref_acdf = 0.0[source]#
limit_pref_acdf = 0.0[source]#
has_dos[source]#
has_cdf[source]#
has_ados[source]#
has_acdf[source]#
forward(input_dict, model, label, natoms, learning_rate=0.0, mae=False)[source]#

Return loss on local and global tensors.

Parameters:
input_dictdict[str, torch.Tensor]

Model inputs.

modeltorch.nn.Module

Model to be used to output the predictions.

labeldict[str, torch.Tensor]

Labels.

natomsint

The local atom number.

Returns:
model_pred: dict[str, torch.Tensor]

Model predictions.

loss: torch.Tensor

Loss for model to minimize.

more_loss: dict[str, torch.Tensor]

Other losses for display.

property label_requirement: list[deepmd.utils.data.DataRequirementItem][source]#

Return data label requirements needed for this loss calculation.