-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: random_ expects 'from' to be less than 'to', but got from=0 >= to=0 #74
Comments
What batch size are you using? How many cell types are there that could possibly be negative examples (eg, from the same species but with a different cell type to the anchor cell? |
Many thanks for your reply. The batch size and pretrain batch size are both 1024. The detailed parameters are below. There are only two sub cell types of fibroblast (as shown above, c0 and c1) within each species.
|
How many cells of each cell type are there? |
The number of cells in each sub-cell type (c0, c1, c2, ...) is below. species2 species3 species4 species5 species6 species7 species8 |
I think the most likely reason this is happening is that within a batch, there are not enough examples of the negative cell type for the triplet mining function. Without making major modifications to the codebase, you could consider the following steps to try and avoid this:
Alternatively, you could also check out our method UCE https://www.biorxiv.org/content/10.1101/2023.11.28.568918v1 https://github.com/snap-stanford/UCE which won't have any of these issues since it doesn't require training a model from scratch. |
Dear Dr. Rosen,
Many thanks for providing the wonderful integration tool. I have used SATURN for my cell type evolution project. While other cell types were successfully integrated, I met an error when I integrated fibroblast across 10 species (mouse and other 9 species).
I wonder whether it because the number of fibroblast subcluster varied greatly (see example below). But pairwise integration (like mouse vs another one species) is okay.
I'd appreciate it if you could get back to me. Thank you.
Best wishes,
Sheng
The text was updated successfully, but these errors were encountered: