title: how to implement ctc loss function for Sequential model in keras
body: <p>Hi guys i have cnn+lstm keras model and i want to use ctc loss function,there are bunch off solutions around but all of them are very confusing any help will be appreciated.
  here is my model:</p>
  
  <pre><code>model=Sequential()
  model.add(Conv2D(32, (3, 3), input_shape=(28, 28,3), activation='relu'))
  model.add(Conv2D(32, (3, 3), activation='relu'))
  model.add(MaxPooling2D(pool_size=(2, 2)))
  model.add(Conv2D(32, (3, 3), activation='relu'))
  model.add(Conv2D(32, (3, 3), activation='relu'))
  model.add(MaxPooling2D(pool_size=(2, 2)))
  model.add(Flatten())
  model.add(Dense(32, activation='relu'))
  model.add(RepeatVector(25))
  model.add(LSTM(128, return_sequences=True, input_shape=(25,32), activation='relu'))
  model.add(LSTM(256))
  model.add(Dropout(0.25))
  model.add(Dense(37))
  model.compile(loss='ctc_loss', optimizer='rmsprop')
  </code></pre>