Skip to content

RuntimeError: received an empty list of sequences #25

@alice-create

Description

@alice-create

When the training epoches starts to evaluate, it will raise this Runtime Error. Hope anyone can help me to solve it.
The detail of the error message is below:
line 567, in evaluate
predicted_docs = [self.predict(doc) for doc in tqdm(val_corpus) if len(doc) != 0]
line 567, in
predicted_docs = [self.predict(doc) for doc in tqdm(val_corpus) if len(doc) != 0]
line 596, in predict
spans, probs = self.model(doc)
line 1102, in _call_impl
return forward_call(*input, **kwargs)
line 423, in forward
states, embeds = self.encoder(doc)
line 1102, in _call_impl
return forward_call(*input, **kwargs)
line 205, in forward
packed, reorder = pack(embeds)
line 73, in pack
packed = pack_sequence(sorted_tensors)
line 398, in pack_sequence
return pack_padded_sequence(pad_sequence(sequences), lengths, enforce_sorted=enforce_sorted)
line 363, in pad_sequence
return torch._C._nn.pad_sequence(sequences, batch_first, padding_value)
RuntimeError: received an empty list of sequences

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions