openfold icon indicating copy to clipboard operation
openfold copied to clipboard

Shouldn't loss for each example be weighed by the sqrt of the length?

Open tsjain opened this issue 10 months ago • 0 comments

From the code it appears that the loss for an entire batch is scaled by either the crop length or the average of the sequence length for the batch.

Shouldn't each individual sample's loss be scaled by the sqrt of its length?

https://github.com/aqlaboratory/openfold/blob/main/openfold/utils/loss.py#L1776

tsjain avatar Jan 18 '25 00:01 tsjain