Yes, it small sample which should recognize mnist sequence
import cv2
import numpy as np
import torch
from torch import Tensor
from torch import nn
from torch.autograd import Variable

from warpctc_pytorch import CTCLoss

criterion = CTCLoss()

batch_size = 256
for i in range(10):
    labels = Variable(torch.from_numpy(np.random.randint(0, 10, (batch_size, 2))).int()).view(-1)
    acts = Variable(torch.randn((2, batch_size, 11)), requires_grad=True)
    act_lens = Variable(Tensor([2] * batch_size).int())
    label_lens = Variable(Tensor([2] * batch_size).int())
    loss = criterion(acts, labels, act_lens, label_lens) / batch_size
    loss.backward()
    print("loss: {}".format(loss.data[0]))