som-dst icon indicating copy to clipboard operation
som-dst copied to clipboard

the value of max_update may be zero

Open ChocoWu opened this issue 4 years ago • 0 comments

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

ChocoWu avatar Jul 21 '20 09:07 ChocoWu