title: Keras - Char 74k Character Recoginition - CNN
body: <p>I followed the following blog for Character Recognition using CNN. 
  <a href="http://ankivil.com/kaggle-first-steps-with-julia-chars74k-first-place-using-convolutional-neural-networks" rel="nofollow noreferrer">http://ankivil.com/kaggle-first-steps-with-julia-chars74k-first-place-using-convolutional-neural-networks</a></p>
  
  <p>The only change I did was dim_ordering="th" latest keras compatibility.</p>
  
  <pre><code>model = Sequential()
  
      model.add(Convolution2D(128, 3, 3, border_mode='same', init='he_normal', activation = 'relu', input_shape=(1, img_rows, img_cols)))
      print model.output_shape
      model.add(Convolution2D(128, 3, 3, border_mode='same', init='he_normal', activation = 'relu'))
      print model.output_shape
  
      model.add(MaxPooling2D(pool_size=(2, 2), dim_ordering="th"))
      print model.output_shape
  
      model.add(Convolution2D(256, 3, 3, border_mode='same', init='he_normal', activation = 'relu'))
      print model.output_shape
      model.add(Convolution2D(256, 3, 3, border_mode='same', init='he_normal', activation = 'relu'))
      print model.output_shape
  
      model.add(MaxPooling2D(pool_size=(2, 2), dim_ordering="th"))
      print model.output_shape
  
      model.add(Convolution2D(512, 3, 3, border_mode='same', init='he_normal', activation = 'relu'))
      print model.output_shape
      model.add(Convolution2D(512, 3, 3, border_mode='same', init='he_normal', activation = 'relu'))
      print model.output_shape
      model.add(Convolution2D(512, 3, 3, border_mode='same', init='he_normal', activation = 'relu'))
      print model.output_shape
  
      model.add(MaxPooling2D(pool_size=(2, 2), dim_ordering="th"))
      print model.output_shape
  
      model.add(Flatten())
      print model.output_shape
      model.add(Dense(4096, init='he_normal', activation = 'relu'))
      print model.output_shape
      model.add(Dropout(0.5))
      print model.output_shape
      model.add(Dense(4096, init='he_normal', activation = 'relu'))
      print model.output_shape
      model.add(Dropout(0.5))
      print model.output_shape
      model.add(Dense(nb_classes, init='he_normal', activation = 'softmax'))
      print model.output_shape
  </code></pre>
  
  <p>I am getting a very poor accuracy of 0.07 after 50 - 60 Iterations and it got stuck there.</p>
  
  <p>Can you please suggest some pointers for me ? I am open for other models performing OCR using CNN.</p>
  
  <p>Thanks,
  Siva</p>