deep learning for text and sequences model compile(optimizer=rmsprop()loss='mae'history model fit_generator(train_gensteps_per_epoch= epochs= validation_data=val_genvalidation_steps=val_stepslet' display the loss curves for validation and training (see figure listing plot ing result import matplotlib pyplot as plt loss history history['loss'val_loss history history['val_loss'epochs range( len(loss plt figure(plt plot(epochsloss'bo'label='training loss'plt plot(epochsval_loss' 'label='validation loss'plt title('training and validation loss'plt legend(plt show(figure training and validation loss on he jena temperatureforecast ing task wit simpledensely connect ed net work some of the validation losses are close to the no-learning baselinebut not reliably this goes to show the merit of having this baseline in the first placeit turns out to be not easy to outperform your common sense contains lot of valuable information that machine-learning model doesn' have access to you may wonderif simplewell-performing model exists to go from the data to the targets (the common-sense baseline)why doesn' the model you're training find it and improve on itbecause this simple solution isn' what your training setup is looking for the space of models in which you're searching for solution--that isyour hypothesis space--is the space of all possible two-layer networks with the configuration you defined these networks are already fairly complicated when you're looking for licensed to