def test_model_crnn_bug(self):
    model = Sequential(self.s, model_table='crnn')
    model.add(InputLayer(3, 256, 16))
    model.add(Reshape(height=16, width=256, depth=3))
    model.add(Conv2d(64, 3, 3, stride=1, padding=1))
    model.add(Pooling(2, 2, 2))
    model.add(Conv2d(128, 3, 3, stride=1, padding=1))
    model.add(Pooling(2, 2, 2))
    model.add(Conv2d(256, 3, 3, stride=1, padding=1, act='IDENTITY'))
    model.add(BN(act='RELU'))
    model.add(Conv2d(256, 3, 3, stride=1, padding=1))
    model.add(Pooling(1, 2, stride_horizontal=1, stride_vertical=2))
    model.add(Conv2d(512, 3, 3, stride=1, padding=1, act='IDENTITY'))
    model.add(BN(act='RELU'))
    model.add(Conv2d(512, 3, 3, stride=1, padding=1))
    model.add(Pooling(1, 2, stride_horizontal=1, stride_vertical=2))
    model.add(Conv2d(512, 3, 3, stride=1, padding=1, act='IDENTITY'))
    model.add(BN(act='RELU'))
    model.add(Reshape(order='DWH', width=64, height=512, depth=1))
    model.add(Recurrent(512, output_type='SAMELENGTH'))
    model.add(OutputLayer(error='CTC'))
    model.print_summary()
def test_model_crnn_bug(self):
    model = Sequential(self.s, model_table='crnn')
    model.add(InputLayer(3, 256, 16))
    model.add(Reshape(height=16, width=256, depth=3))
    model.add(Conv2d(64, 3, 3, stride=1, padding=1))
    model.add(Pooling(2, 2, 2))
    model.add(Conv2d(128, 3, 3, stride=1, padding=1))
    model.add(Pooling(2, 2, 2))
    model.add(Conv2d(256, 3, 3, stride=1, padding=1, act='IDENTITY'))
    model.add(BN(act='RELU'))
    model.add(Conv2d(256, 3, 3, stride=1, padding=1))
    model.add(Pooling(1, 2, stride_horizontal=1, stride_vertical=2))
    model.add(Conv2d(512, 3, 3, stride=1, padding=1, act='IDENTITY'))
    model.add(BN(act='RELU'))
    model.add(Conv2d(512, 3, 3, stride=1, padding=1))
    model.add(Pooling(1, 2, stride_horizontal=1, stride_vertical=2))
    model.add(Conv2d(512, 3, 3, stride=1, padding=1, act='IDENTITY'))
    model.add(BN(act='RELU'))
    model.add(Reshape(order='DWH', width=64, height=512, depth=1))
    model.add(Recurrent(512, output_type='SAMELENGTH'))
    model.add(OutputLayer(error='CTC'))
    model.print_summary()