skip-thoughts.torch icon indicating copy to clipboard operation
skip-thoughts.torch copied to clipboard

Error when batch size = 1

Open zengxianyu opened this issue 6 years ago • 0 comments

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''

zengxianyu avatar Jun 28 '18 02:06 zengxianyu