运行main.py后出现如下问题
build batched crf...
THCudaCheck FAIL file=/pytorch/torch/lib/THC/generic/THCStorage.cu line=58 error=2 : out of memory
Traceback (most recent call last):
File "main.py", line 458, in
train(data, save_model_dir, seg)
File "main.py", line 252, in train
model = SeqModel(data)
File "/home/xfbai/LatticeLSTM/model/bilstmcrf.py", line 24, in init
self.crf = CRF(label_size, self.gpu)
File "/home/xfbai/LatticeLSTM/model/crf.py", line 47, in init
init_transitions = init_transitions.cuda()
File "/home/xfbai/anaconda3/envs/py2/lib/python2.7/site-packages/torch/_utils.py", line 69, in _cuda
return newtype(self.size()).copy(self, async)
RuntimeError: cuda runtime error (2) : out of memory at /pytorch/torch/lib/THC/generic/THCStorage.cu:58
请问是什么问题呢,试过网上很多方法都没用,batch_size已经是1了。
谢谢。
运行main.py后出现如下问题 build batched crf... THCudaCheck FAIL file=/pytorch/torch/lib/THC/generic/THCStorage.cu line=58 error=2 : out of memory Traceback (most recent call last): File "main.py", line 458, in
train(data, save_model_dir, seg)
File "main.py", line 252, in train
model = SeqModel(data)
File "/home/xfbai/LatticeLSTM/model/bilstmcrf.py", line 24, in init
self.crf = CRF(label_size, self.gpu)
File "/home/xfbai/LatticeLSTM/model/crf.py", line 47, in init
init_transitions = init_transitions.cuda()
File "/home/xfbai/anaconda3/envs/py2/lib/python2.7/site-packages/torch/_utils.py", line 69, in _cuda
return newtype(self.size()).copy(self, async)
RuntimeError: cuda runtime error (2) : out of memory at /pytorch/torch/lib/THC/generic/THCStorage.cu:58
请问是什么问题呢,试过网上很多方法都没用,batch_size已经是1了。
谢谢。