Tips for RNN in keras

In Keras we could use LSTM,GRU,SimpleRNN just as simple as in sklearn. here we mainly wonder to share some thing about LSTM,which could be divied into two subclass LSTM with statful or without stateful Input_shape, [samples,timesteps,input_dim] here, samples is the

A deep NN for mnist in keras

from keras.models import Sequential from keras.layers import Dense,Activation,Dropout from keras.optimizers import RMSprop import keras from keras.datasets import mnist batch_size = 128 %% 批量训练的值 num_classes = 10 %%标签种类 epochs = 20 %% 重复训练的次数 # the data, split between train and test