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

CUDA error #71

Open
Zhenxiaoan opened this issue Sep 9, 2024 · 2 comments
Open

CUDA error #71

Zhenxiaoan opened this issue Sep 9, 2024 · 2 comments

Comments

@Zhenxiaoan
Copy link

When run code " bash ./scripts/MSL.sh" raised error:
Traceback (most recent call last):
File "main.py", line 52, in
main(config)
File "main.py", line 18, in main
solver = Solver(vars(config))
File "/storage/student1/c_cxl/cxl/Anomaly-Transformer/solver.py", line 85, in init
self.build_model()
File "/storage/student1/c_cxl/cxl/Anomaly-Transformer/solver.py", line 90, in build_model
self.model = AnomalyTransformer(win_size=self.win_size, enc_in=self.input_c, c_out=self.output_c, e_layers=3)
File "/storage/student1/c_cxl/cxl/Anomaly-Transformer/model/AnomalyTransformer.py", line 77, in init
) for l in range(e_layers)
File "/storage/student1/c_cxl/cxl/Anomaly-Transformer/model/AnomalyTransformer.py", line 77, in
) for l in range(e_layers)
File "/storage/student1/c_cxl/cxl/Anomaly-Transformer/model/attn.py", line 29, in init
self.distances = torch.zeros((window_size, window_size)).cuda()
File "/storage/student1/c_cxl/miniconda3/envs/Anomaly_Trans/lib/python3.6/site-packages/torch/cuda/init.py", line 214, in _lazy_init
torch._C._cuda_init()
RuntimeError: No CUDA GPUs are available

@Zhenxiaoan
Copy link
Author

Sorry,I figure it out. Pytorch's version is wrong.

@JeSciglio
Copy link

Sorry,I figure it out. Pytorch's version is wrong.

I meet the same mistake.Pytorch version is 1.8.0,cuda 10.2,python 3.6
I cannot figure it out.How did you solve it?

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