refactored code
refactored code


Former-commit-id: 47f3eec406e099e1a1bcda943fc651c3e4975aa2
yoonkim/word-char-rnn,yoonkim/lstm-char-cnn,fiskio/lstm-char-cnn,pengsun/lstm-char-cnn,carpedm20/lstm-char-cnn,ZhouJiaLinmumu/lstm-char-cnn,wavelets/lstm-char-cnn