deepfold.losses.geometry.compute_fape¶
- deepfold.losses.geometry.compute_fape(pred_frames: Rigid, target_frames: Rigid, frames_mask: Tensor, pred_positions: Tensor, target_positions: Tensor, positions_mask: Tensor, length_scale: float, l1_clamp_distance: float | None = None, eps: float = 1e-08) Tensor[source]¶
Computes FAPE loss.
- Parameters:
pred_frames – Rigid object of predicted frames. [*, N_frames]
target_frames – Rigid object of ground truth frames. [*, N_frames]
frames_mask – Binary mask for the frames. [*, N_frames]
pred_positions – Predicted atom positions. [*, N_pts, 3]
target_positions – Ground truth positions. [*, N_pts, 3]
positions_mask – Positions mask. [*, N_pts]
length_scale – Length scale by which the loss is divided.
l1_clamp_distance – Cutoff above which distance errors are disregarded.
eps – Small value used to regularize denominators.
- Returns:
FAPE loss tensor.