'Tests that the output sizes match when training with CTC.
Basic bidi LSTM on top of convolution and summarizing LSTM with CTC.'

def testEndToEndSizes1dCTC(self):

    filename = _testdata('arial-32-tiny')
    with self.test_session() as sess:
        model = vgsl_model.InitNetwork(filename, model_spec='2,0,0,1[Cr5,5,16    Mp3,3    Lfys16    Lbx100]O1c105', mode='train')
        tf.global_variables_initializer().run(session=sess)
        coord = tf.train.Coordinator()
        tf.train.start_queue_runners(sess=sess, coord=coord)
        (_, step) = model.TrainAStep(sess)
        self.assertEqual(step, 1)
        (output, labels) = model.RunAStep(sess)
        self.assertEqual(len(output.shape), 3)
        self.assertEqual(len(labels.shape), 2)
        self.assertEqual(output.shape[0], labels.shape[0])
        self.assertLessEqual(labels.shape[1], output.shape[1])
        self.assertEqual(output.shape[2], 105)
