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

There are no tokens_ id in sample,Could you explain it? #20

Open
ppzhr opened this issue Mar 20, 2023 · 0 comments
Open

There are no tokens_ id in sample,Could you explain it? #20

ppzhr opened this issue Mar 20, 2023 · 0 comments

Comments

@ppzhr
Copy link

ppzhr commented Mar 20, 2023

Traceback (most recent call last):
File "main.py", line 418, in
config.run(mode=args.mode)
File "main.py", line 161, in run
self.train()
File "main.py", line 404, in train
new_score, log = self.evaluation(dev_loader)
File "main.py", line 306, in evaluation
output = self.model(sample, is_train=False)
File "/home/jp/data/anaconda3/envs/openjere/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/jp/zhr/copymtl/OpenJERE/openjere/models/seq2umt.py", line 112, in forward
result = self.decoder.test_forward(sample, o, h)
File "/home/jp/zhr/copymtl/OpenJERE/openjere/models/seq2umt.py", line 448, in test_forward
text_id = sample.tokens_id.cuda(self.gpu)
AttributeError: 'Batch_reader' object has no attribute 'tokens_id'

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