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

TypeError: make_src() takes 2 positional arguments but 3 were given #5

Open
jasscia18 opened this issue Sep 30, 2020 · 0 comments
Open

Comments

@jasscia18
Copy link

paraphrases = self.ps.generate_paraphrases(instance_for_onmt, topk=topk+1, edit_distance_cutoff=4, threshold=threshold)
File "/home/scan/DVSI/sscc/paraphrase_scorer.py", line 799, in generate_paraphrases
translation, mapping = choose_forward_translation(sentence, to, back, n=5)
File "/home/scan/DVSI/sscc/paraphrase_scorer.py", line 30, in choose_forward_translation
translations = to_translator.translate([sentence], n_best=n, return_from_mapping=True)[0]
File "/home/scan/DVSI/sscc/onmt_model.py", line 179, in translate
for batch in testData:
File "/usr/local/lib/python3.6/site-packages/torchtext/data/iterator.py", line 151, in iter
self.train)
File "/usr/local/lib/python3.6/site-packages/torchtext/data/batch.py", line 27, in init
setattr(self, name, field.process(batch, device=device, train=train))
File "/usr/local/lib/python3.6/site-packages/torchtext/data/field.py", line 188, in process
tensor = self.numericalize(padded, device=device, train=train)
File "/usr/local/lib/python3.6/site-packages/torchtext/data/field.py", line 308, in numericalize
arr = self.postprocessing(arr, None, train)
TypeError: make_src() takes 2 positional arguments but 3 were given

Do you know how to solve this problem???

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

1 participant