Skip to content

the value of max_update may be zero #2

@ChocoWu

Description

@ChocoWu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions