In [10]:
from keras.models import Sequential
from keras.layers import Dense, Activation
from read_dataset import read_ceps_with_train_test

model = Sequential()

model.add(Dense(units=64, input_dim=20))
model.add(Activation('relu'))
model.add(Dense(units=10))
model.add(Activation('softmax'))

In [11]:
model.compile(loss='categorical_crossentropy',
             optimizer='sgd',
             metrics=['accuracy'])

In [12]:
X_train, X_test, y_train, y_test = read_ceps_with_train_test()

In [13]:
model.fit(X_train, y_train, epochs=5, batch_size=32)


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-13-563f179ed52c> in <module>()
----> 1 model.fit(X_train, y_train, epochs=5, batch_size=32)

/home/minato/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/keras/models.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, **kwargs)
    868                               class_weight=class_weight,
    869                               sample_weight=sample_weight,
--> 870                               initial_epoch=initial_epoch)
    871 
    872     def evaluate(self, x, y, batch_size=32, verbose=1,

/home/minato/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, **kwargs)
   1433             class_weight=class_weight,
   1434             check_batch_axis=False,
-> 1435             batch_size=batch_size)
   1436         # Prepare validation data.
   1437         if validation_data:

/home/minato/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/keras/engine/training.py in _standardize_user_data(self, x, y, sample_weight, class_weight, check_batch_axis, batch_size)
   1313                                     output_shapes,
   1314                                     check_batch_axis=False,
-> 1315                                     exception_prefix='target')
   1316         sample_weights = _standardize_sample_weights(sample_weight,
   1317                                                      self._feed_output_names)

/home/minato/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/keras/engine/training.py in _standardize_input_data(data, names, shapes, check_batch_axis, exception_prefix)
    137                             ' to have shape ' + str(shapes[i]) +
    138                             ' but got array with shape ' +
--> 139                             str(array.shape))
    140     return arrays
    141 

ValueError: Error when checking target: expected activation_4 to have shape (None, 10) but got array with shape (600, 1)