def test_mk_iter(self): it, context = Datasets.mk_iter(self.test_resources_dir) batch_it = it.get_next() with tf.Session() as sess: batch = sess.run(batch_it) self.assertEqual(len(batch), self.N_FEATURES) first_feature = list(context.features.keys())[0] self.assertEqual(len(batch[first_feature]), tf.flags.FLAGS["batch-size"].value)
def test_feature_order_multispec(self): expected_features = ["f3", "f1", "f2_EVEN", "f2_ODD"] _, context = Datasets.mk_iter(self.test_resources_dir) feature_names, _ = context.multispec_feature_groups self.assertEqual(feature_names, expected_features)