AttributeError in lesson1

Due to the changes in Keras 2.0 from previous one, this error occurred. In order to comply with Keras 2.0, do as the following thread says i.e.

nb_class to num_class
nb_sample to samples

Hope this helps !