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

Implement PreSumm #1067

Merged
merged 5 commits into from
May 24, 2023
Merged

Implement PreSumm #1067

merged 5 commits into from
May 24, 2023

Conversation

srpkdyy
Copy link
Contributor

@srpkdyy srpkdyy commented Mar 15, 2023

@srpkdyy srpkdyy requested a review from kyakuno March 15, 2023 10:23
@srpkdyy
Copy link
Contributor Author

srpkdyy commented Mar 15, 2023

ExtモデルとAbsモデル両方提供されていますが、Abs側の公式プログラムにバグを確認

Traceback (most recent call last):
File "D:\job\PreSumm\src\train.py", line 140, in
test_text_abs(args)
File "D:\job\PreSumm\src\train_abstractive.py", line 333, in test_text_abs
predictor.translate(test_iter, -1)
File "D:\job\PreSumm\src\models\predictor.py", line 151, in translate
batch_data = self.translate_batch(batch)
File "D:\job\PreSumm\src\models\predictor.py", line 214, in translate_batch
return self._fast_translate_batch(
File "D:\job\PreSumm\src\models\predictor.py", line 338, in _fast_translate_batch
[alive_seq.index_select(0, select_indices),
RuntimeError: index_select(): Expected dtype int32 or int64 for index

@srpkdyy
Copy link
Contributor Author

srpkdyy commented Mar 15, 2023

Indexにスコアのような少数が入ってきているようです

########## Alive Seq #############
torch.Size([5, 1])
<class 'torch.Tensor'>
tensor([[1],
[1],
[1],
[1],
[1]])
########## select_indices #############
torch.Size([5])
<class 'torch.Tensor'>
tensor([0.1432, 0.0654, 0.2367, 0.0339, 0.5090])

公式Issueでも報告されているようです
nlpyang/PreSumm#234

@kyakuno
Copy link
Collaborator

kyakuno commented May 23, 2023

モデルアップロード済み。
https://storage.googleapis.com/ailia-models/presumm/cnndm-bertext.onnx.prototxt

kyakuno added 3 commits May 24, 2023 16:47
# Conflicts:
#	README.md
#	scripts/download_all_models.sh
@kyakuno kyakuno merged commit 80d8ae9 into master May 24, 2023
@kyakuno kyakuno deleted the PreSumm branch May 24, 2023 07:50
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

Successfully merging this pull request may close these issues.

2 participants