Skip to content

Commit

Permalink
Move utils/dataset.py to legacy and we will use tf.contrib.data.Datas…
Browse files Browse the repository at this point in the history
…et instead for data loading.
  • Loading branch information
npuichigo committed Sep 11, 2017
1 parent 4f9b419 commit a939010
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/datasets.py → src/legacy/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import tensorflow as tf

sys.path.append(os.path.dirname(sys.path[0]))
from io_funcs.tfrecords_io import get_padded_batch
from io_funcs.tfrecords_io import get_padded_batch, get_seq2seq_batch


class SequenceDataset(snt.AbstractModule):
Expand Down Expand Up @@ -53,7 +53,7 @@ def __init__(self, subset, config_dir, data_dir, batch_size,
self._num_epochs = num_epochs
self._infer = infer
self._tfrecords_lst = self.read_config_file(subset)
self._num_batches = int(math.ceil(len(self._tfrecords_lst) / self._batch_size))
self._num_batches = int(math.ceil(len(self._tfrecords_lst) / float(self._batch_size)))

def _build(self):
if not self._infer:
Expand Down

0 comments on commit a939010

Please sign in to comment.