Cartus / AGGCN

Attention Guided Graph Convolutional Networks for Relation Extraction (authors' PyTorch implementation for the ACL19 paper)
MIT License
433 stars 88 forks source link

some error about:"RuntimeError: cuda runtime error (100) : " #22

Closed ysn7 closed 4 years ago

ysn7 commented 4 years ago

hello,when i run the " bash train_aggcn.sh",there are some errors. but,i test my torch: Default GPU Device: /device:GPU:0 Your tensorflow-gpu is available Default GPU Device: Tesla P4 Your pytorch-gpu is available and,my environment is cuda:10.1 python:3.7.5 pytorch:1.3. could you please help me to solve this error? thank you very much!

Finetune all embeddings. Traceback (most recent call last): File "train.py", line 120, in trainer = GCNTrainer(opt, emb_matrix=emb_matrix) File "/home/yaoshengnan/AGGCN-master/semeval/model/trainer.py", line 68, in init self.model = GCNClassifier(opt, emb_matrix=emb_matrix) File "/home/yaoshengnan/AGGCN-master/semeval/model/aggcn.py", line 26, in init self.gcn_model = GCNRelationModel(opt, emb_matrix=emb_matrix) File "/home/yaoshengnan/AGGCN-master/semeval/model/aggcn.py", line 51, in init self.gcn = AGGCN(opt, embeddings) File "/home/yaoshengnan/AGGCN-master/semeval/model/aggcn.py", line 133, in init self.layers.append(GraphConvLayer(opt, self.mem_dim, self.sublayer_first)) File "/home/yaoshengnan/AGGCN-master/semeval/model/aggcn.py", line 206, in init self.weight_list = self.weight_list.cuda() File "/root/anaconda3/envs/tf14/lib/python3.7/site-packages/torch/nn/modules/module.py", line 305, in cuda return self._apply(lambda t: t.cuda(device)) File "/root/anaconda3/envs/tf14/lib/python3.7/site-packages/torch/nn/modules/module.py", line 202, in _apply module._apply(fn) File "/root/anaconda3/envs/tf14/lib/python3.7/site-packages/torch/nn/modules/module.py", line 224, in _apply param_applied = fn(param) File "/root/anaconda3/envs/tf14/lib/python3.7/site-packages/torch/nn/modules/module.py", line 305, in return self._apply(lambda t: t.cuda(device)) File "/root/anaconda3/envs/tf14/lib/python3.7/site-packages/torch/cuda/init.py", line 193, in _lazy_init torch._C._cuda_init() RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:50

ysn7 commented 4 years ago

pytorch=1.3.1

ysn7 commented 4 years ago

thank you ,it has been solved

amazingYX commented 4 years ago

Hello, I have the same problem as you. Could you tell me how to solve it

ZohaibRamzan commented 3 years ago

thank you ,it has been solved

Can you mention what was the problem?