BayraktarLab / cell2location

Comprehensive mapping of tissue cell architecture via integrated single cell and spatial transcriptomics (cell2location model)
https://cell2location.readthedocs.io/en/latest/
Apache License 2.0
324 stars 58 forks source link

half precision for Mod.train #308

Open chengarthur opened 1 year ago

chengarthur commented 1 year ago

Hi, we use cell2location on a dataset generated by our own Sptial protocol however we have far much more SPOTs than 10X visum , so our GPU ran out of memory, is there any half precision(FP16) api since you built your package based on pytorch, it would be very helpful if you told me how to train this model at half precision level

vitkl commented 1 year ago

See the issue about multi GPU training about potential solutions to this problem. If you try half precision - please let us know if it works. It didn’t work for us in the past due to numerical accuracy.