jianhuupenn / SpaGCN

SpaGCN: Integrating gene expression, spatial location and histology to identify spatial domains and spatially variable genes by graph convolutional network
MIT License
191 stars 59 forks source link

Session crash on google colab #44

Closed shashkat closed 1 year ago

shashkat commented 2 years ago

Hello there,

I am trying to use SpaGCN on google colab, as it is quite hectic to download packages on my m1 macbook. However, upon running the spg.detect_spatial_domains_ez_mode command from the tutorial of easy mode, on the tutorial data, my google colab session is getting crashed. It is due to RAM getting full on colab. Is there some way out of this problem?

Thanks

Edit-1: I have tried changing runtime to GPU and TPU, but having the same problem.

I get the following output in the last cell before the crash:


Calculateing adj matrix using histology image...
Var of c0,c1,c2 =  33.30687202862215 174.55510595352243 46.84205750749746
Var of x,y,z =  5606737.526317932 4468793.817921193 5606737.526317932
Run 1: l [0.01, 1000], p [0.0, 153.882049263866]
Run 2: l [0.01, 500.005], p [0.0, 28.01544761657715]
Run 3: l [0.01, 250.0075], p [0.0, 4.240330219268799]
Run 4: l [0.01, 125.00874999999999], p [0.0, 0.5157277584075928]
Run 5: l [62.509375, 125.00874999999999], p [0.028496861457824707, 0.5157277584075928]
Run 6: l [93.7590625, 125.00874999999999], p [0.18753135204315186, 0.5157277584075928]
Run 7: l [109.38390625, 125.00874999999999], p [0.32801353931427, 0.5157277584075928]
Run 8: l [117.196328125, 125.00874999999999], p [0.41564691066741943, 0.5157277584075928]
Run 9: l [121.1025390625, 125.00874999999999], p [0.4640926122665405, 0.5157277584075928]
Run 10: l [123.05564453125, 125.00874999999999], p [0.4895068407058716, 0.5157277584075928]
recommended l =  124.032197265625
Start at res =  0.7 step =  0.1
Initializing cluster centers with louvain, resolution =  0.7
jianhuupenn commented 1 year ago

What is the dimension of your input? #36 maybe a related issue.