changwn / scFEA

single cell Flux Estimation Analysis (scFEA) Try the below web server!
http://scflux.org/
Other
94 stars 33 forks source link

Starting train neural network... 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [01:19<00:00, 1.25it/s] Training time: 79.83818292617798 Traceback (most recent call last): File "src/scFEA.py", line 370, in <module> main(args) File "src/scFEA.py", line 299, in main fluxStatuTest[i, :] = out_m_batch.detach().numpy() TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first. #59

Open seekning opened 3 months ago

seekning commented 3 months ago

sorry. when i running at this part : Starting train neural network... 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [01:19<00:00, 1.25it/s] Training time: 79.83818292617798 Traceback (most recent call last): File "src/scFEA.py", line 370, in main(args) File "src/scFEA.py", line 299, in main fluxStatuTest[i, :] = out_m_batch.detach().numpy() TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

how could i slove this bug ,holp for your request.

skymoswu commented 1 month ago

I editted line 299 in src/scFEA.py to out_m_batch.cpu().detach().numpy() to avoid the error.