Skip to content
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

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 this issue Jun 30, 2024 · 1 comment

Comments

@seekning
Copy link

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
Copy link

skymoswu commented Sep 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants