f210f5a82b4258925d298b5896d5157cdde333c2,opennmt/tests/data_test.py,DataTest,testIrregularBatches,#DataTest#,8

Before Change


    iterator = dataset.make_one_shot_iterator()
    next_element = iterator.get_next()

    with self.test_session() as sess:
      single_element = sess.run(next_element)
      self.assertEqual(batch_size, single_element["x"].size)
      with self.assertRaises(tf.errors.OutOfRangeError):
        sess.run(next_element)

  def testRandomShard(self):
    dataset_size = 42
    shard_size = 3

After Change


    iterator = self._iterDataset(dataset)
    single_element = next(iterator)
    self.assertEqual(batch_size, single_element["x"].shape[0])
    with self.assertRaises(StopIteration):
      next(iterator)

  def testRandomShard(self):
    dataset_size = 42
    shard_size = 3
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: OpenNMT/OpenNMT-tf
Commit Name: f210f5a82b4258925d298b5896d5157cdde333c2
Time: 2019-02-11
Author: guillaume.klein@systrangroup.com
File Name: opennmt/tests/data_test.py
Class Name: DataTest
Method Name: testIrregularBatches


Project Name: OpenNMT/OpenNMT-tf
Commit Name: f210f5a82b4258925d298b5896d5157cdde333c2
Time: 2019-02-11
Author: guillaume.klein@systrangroup.com
File Name: opennmt/tests/data_test.py
Class Name: DataTest
Method Name: _testFilterByLength


Project Name: deepmind/sonnet
Commit Name: bc08dbfbe77554bf3458529285003f0bf92eecd3
Time: 2018-07-17
Author: fviola@google.com
File Name: sonnet/python/modules/nets/vqvae_test.py
Class Name: VqvaeTest
Method Name: testShapeChecking