Open TITC opened 3 years ago
Dear author, I have found some links to furthermore confirm the issue. Finally, I find a way to alleviate the issuecuda runtime error (59)
through below code add in sow/train.py
os.environ['CUDA_LAUNCH_BLOCKING'] = "1"
and then bash shell give relative clear issue as below
File "/content/sow-reap-paraphrasing/sow/models/transformer.py", line 71, in forward
y = self.pos_embedder(input_postags).mul_(self.scale_embedding)
I think this part is correlated to your paper, which is Target order r
? But I am not sure, cause here is a multiply operation.
reference: https://discuss.pytorch.org/t/device-side-assert-triggered-at-error/82488/5
ok, as I think here is the problem
model_config['postag_size'] = len(pos)
above should change to
model_config['postag_size'] = len(pos)+1
reference: https://blog.csdn.net/Geek_of_CSDN/article/details/86527107
Here still are some things not make sense
pos class is 71, so I can solve the problem by add 1 to model_config['postag_size']
but the dev set made by your script appears 71 is strange. Cause the size of POS is 71, so the index is not possible be 71.
the other aspect is that all values in your dev set provide by your google drive are all below 71. But still has this error, and also can be fixed by add 1.
The reason of POS appears 71 is here
for p in pos1 + pos2:
if p not in pos_vocab.keys():
pos_vocab[p] = len(pos_vocab)
rev_pos_vocab[pos_vocab[p]] = p
add new POS to pos_vocab, but save as new pkl file which lead totrain.py
read the previous pos_vocab, furthermore make Embedding size to len(pos_vocab)==70, not 71.
model_config['postag_size'] = len(pos)
Hi, This is an indexing error. Are you using your own data or is this running on the data in the google drive? Is this on the vocabulary that you have created or the one provided in the google drive?
case1 vocabulary and dev dataset from your shared google drive, but the training dataset is created by your provide sample through your script. exist this error
if you not mind, can reproduce this error use my upload files in Github.
Hi, This is an indexing error. Are you using your own data or is this running on the data in the google drive? Is this on the vocabulary that you have created or the one provided in the google drive?
if the error is caused by index, how to explain the error occurred even run in your provided datasets which shared in google drive and index range is 0~70
not exceed 71?
when I trained on a dataset made by
sample_test_sow_reap.txt
, it gives me the fellow errorhere is training dataset