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

训练出错 #1

Open
Vincent131499 opened this issue Jul 9, 2020 · 1 comment
Open

训练出错 #1

Vincent131499 opened this issue Jul 9, 2020 · 1 comment

Comments

@Vincent131499
Copy link

Vincent131499 commented Jul 9, 2020

使用run.sh提供的zen训练msr方式,运行后提示:
]
Traceback (most recent call last):
File "wmseg_main.py", line 604, in
main()
File "wmseg_main.py", line 594, in main
train(args)
File "wmseg_main.py", line 200, in train
matching_matrix, word_mask, ngram_ids, ngram_positions)
File "/home/user/.conda/envs/torch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/user/.conda/envs/torch/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 155, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/home/user/.conda/envs/torch/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 165, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/home/user/.conda/envs/torch/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 85, in parallel_apply
output.reraise()
File "/home/user/.conda/envs/torch/lib/python3.6/site-packages/torch/_utils.py", line 395, in reraise
raise self.exc_type(msg)
StopIteration: Caught StopIteration in replica 0 on device 0.
Original Traceback (most recent call last):
File "/home/user/.conda/envs/torch/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 60, in _worker
output = module(*input, **kwargs)
File "/home/user/.conda/envs/torch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/mnt/stephen-lib/stephen的个人文件夹/my_code/NLP组件研发/词法分析/创新工场-分词-词性标注/WMSeg/wmseg_model.py", line 148, in forward
output_all_encoded_layers=False)
File "/home/user/.conda/envs/torch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/mnt/stephen-lib/stephen的个人文件夹/my_code/NLP组件研发/词法分析/创新工场-分词-词性标注/WMSeg/pytorch_pretrained_zen/modeling.py", line 939, in forward
extended_attention_mask = extended_attention_mask.to(dtype=next(self.parameters()).dtype) # fp16 compatibility
StopIteration

@catqaq
Copy link

catqaq commented Apr 22, 2021

请降级pytorch至1.4或以下

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