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

the value of max_update may be zero #2

Open
ChocoWu opened this issue Jul 21, 2020 · 0 comments
Open

the value of max_update may be zero #2

ChocoWu opened this issue Jul 21, 2020 · 0 comments

Comments

@ChocoWu
Copy link

ChocoWu commented Jul 21, 2020

pytorch version: 0.4.1
when evaluate the model, eval batch size is 1,
if max_update is None: max_update = op_ids.eq(self.update_id).sum(-1).max().item()
the value of max_update might be zero. So run the following code:
v = torch.zeros(1, max_update, self.hidden_size, device=input_ids.device) , An error message may be given: RuntimeError: sizes must be non-negative

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