deepmd.pt.loss.denoise#

Classes#

DenoiseLoss

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

Module Contents#

class deepmd.pt.loss.denoise.DenoiseLoss(ntypes: int, masked_token_loss: float = 1.0, masked_coord_loss: float = 1.0, norm_loss: float = 0.01, use_l1: bool = True, beta: float = 1.0, mask_loss_coord: bool = True, mask_loss_token: bool = True, **kwargs: Any)[source]#

Bases: deepmd.pt.loss.loss.TaskLoss

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

ntypes[source]#
masked_token_loss = 1.0[source]#
masked_coord_loss = 1.0[source]#
norm_loss = 0.01[source]#
has_coord[source]#
has_token[source]#
has_norm[source]#
use_l1 = True[source]#
beta = 1.0[source]#
frac_beta = 1.0[source]#
mask_loss_coord = True[source]#
mask_loss_token = True[source]#
forward(model_pred: dict[str, torch.Tensor], label: dict[str, torch.Tensor], natoms: int, learning_rate: float, mae: bool = False) tuple[torch.Tensor, dict[str, torch.Tensor]][source]#

Return loss on coord and type denoise.

Returns:
  • loss: Loss to minimize.