Skip to content

Error when batch size = 1 #4

Open
@zengxianyu

Description

@zengxianyu

line 135 in skip-thoughts.torch/pytorch/skipthoughts/skipthoughts.py lengths = list(max_length - input.data.eq(0).sum(1).squeeze()) will raise an error if the batch size is 1, saying ``typeError: iteration over a 0-d tensor''

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