Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilevel text field #1216

Merged
merged 18 commits into from
Jan 25, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove some unused code.
  • Loading branch information
flauted committed Jan 23, 2019
commit ea19d878bc110fb3d03c147766e5afa131c9afa2
14 changes: 0 additions & 14 deletions onmt/inputters/inputter.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,6 @@ def make_features(batch, side):
data = batch.__dict__[side]
lengths = None

# if batch.src_is_text or side == 'tgt': # this is temporary, see #1196
# # cat together layers, producing a 3d output tensor for src text
# # and for tgt (which is assumed to be text)
# feat_start = side + "_feat_"
# feat_names = sorted(k for k in batch.__dict__ if feat_start in k)
# levels = [data] + [batch.__dict__[k] for k in feat_names]
# data = torch.cat([level.unsqueeze(2) for level in levels], 2)

return data, lengths


Expand Down Expand Up @@ -418,12 +410,6 @@ def _pool(data, random_shuffler):
self.batch_size_fn):
self.batches.append(sorted(b, key=self.sort_key))

def __iter__(self):
# temporary fix: See #1196
for batch in super(OrderedIterator, self).__iter__():
batch.src_is_text = isinstance(self.dataset, TextDataset)
yield batch


class DatasetLazyIter(object):
"""
Expand Down