openprotein icon indicating copy to clipboard operation
openprotein copied to clipboard

Loss function drmsd component commented out

Open TrentBrick opened this issue 5 years ago • 5 comments

I was wondering why you commented out the drmsd component of the loss function while training?

TrentBrick avatar Apr 18 '19 23:04 TrentBrick

What line are you referring to here?

JeppeHallgren avatar Apr 19 '19 08:04 JeppeHallgren

Lines 53 and 56 of openprotein.py

TrentBrick avatar Apr 19 '19 14:04 TrentBrick

While on the topic of loss functions, am I right that you apply the mask to the tertiary structure and primary sequence when you preprocess the data rather than masking it in the loss function?

This seems bad to me because you are changing the protein itself before it is presented to the neural network and removing potential interactions the model should be acknowledging in making its angle predictions.

TrentBrick avatar Apr 19 '19 14:04 TrentBrick

Hey @TrentBrick , My assumption was that most people would actually want to define their own loss function and overwrite def compute_loss in openprotein.py. Happy to discuss what default loss function makes the most sense - I quickly found that drmsd can have some very steep gradients (changing just one dihedral angle can cause the global drmsd loss to explode).

JeppeHallgren avatar Apr 19 '19 15:04 JeppeHallgren

Processing the masks in the preprocessing was purely done for efficiency reasons (faster that doing it in every training iteration). But of course if a given model needs the masked values, the preprocessing script should have an option not to apply the mask.

JeppeHallgren avatar Apr 19 '19 15:04 JeppeHallgren