Skip to content

Pretraining loss used in the code #67

Description

@Egiob

Hello and thanks for making all this code public!
I have a question regarding the pretraining loss actually used in the training, I understand through looking at the pretraining code (on branch dev-temp) and at the paper that two losses are being used:

  • a gene expression prediction MSE loss, from the output of the transformer stack
  • a second gene expression prediction loss, only from the cell embedding and the original sequence embedding

What I don't get is, as far as I understand, a third loss is being added to these two ones after the variable global_iter gets higher than 1000. Here is the link to the code snippet i'm referring to: https://github.com/bowang-lab/scGPT/blob/4068d67caaac1e28d56964da68e0214817e38428/examples/pretrain.py#L894C1-L909C70.

Could you comment on this additional loss? Please correct me if I misunderstood the paper or the code and thanks again!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions