Cadene / Cadene/skip-thoughts.torch

Error when batch size = 1

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
146
Forks
17
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in skip-thoughts.torch/pytorch/skipthoughts/skipthoughts.py at line 135 and reproduce the failure with a batch size of 1. Done means that case no longer raises the reported TypeError while the existing batch-length behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.