som-dst
som-dst copied to clipboard
the value of max_update may be zero
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