PyTorch_Bert_Text_Classification icon indicating copy to clipboard operation
PyTorch_Bert_Text_Classification copied to clipboard

RuntimeError: Trying to resize storage that is not resizable

Open huanghonggit opened this issue 5 years ago • 0 comments

when l run sh run_train_p.sh get this error , How did you solve this problem?

Traceback (most recent call last): File "main.py", line 162, in main() File "main.py", line 80, in main train_iter, dev_iter, test_iter, alphabet = load_data(config=config) File "/home/huanghong/PyTorch_Bert_Text_Classification-master/DataUtils/mainHelp.py", line 207, in load_data train_iter, dev_iter, test_iter, alphabet = preprocessing(config) File "/home/huanghong/PyTorch_Bert_Text_Classification-master/DataUtils/mainHelp.py", line 141, in preprocessing train_iter, dev_iter, test_iter = create_iter.createIterator() File "/home/huanghong/PyTorch_Bert_Text_Classification-master/DataUtils/Batch_Iterator.py", line 77, in createIterator alphabet=self.alphabet) File "/home/huanghong/PyTorch_Bert_Text_Classification-master/DataUtils/Batch_Iterator.py", line 119, in _Create_Each_Iterator one_batch = self._Create_Each_Batch(insts=batch, alphabet=alphabet) File "/home/huanghong/PyTorch_Bert_Text_Classification-master/DataUtils/Batch_Iterator.py", line 183, in _Create_Each_Batch batch_bert_features = torch.from_numpy(batch_bert_features).float() RuntimeError: Trying to resize storage that is not resizable at /opt/conda/conda-bld/pytorch_1550796191843/work/aten/src/TH/THStorageFunctions.cpp:70

huanghonggit avatar Jun 24 '19 15:06 huanghonggit