def plot_errors(self, logx=False, ax=None, show=True):

        if ax is None:
            ax = plt.gca()

        if not self.errors:
            self.logs.warning("There is no data to plot")
            return ax

        train_errors = self.errors.normalized()
        validation_errors = self.validation_errors.normalized()

        if len(train_errors) != len(validation_errors):
            self.logs.warning("Number of train and validation errors are "
                              "not the same. Ignored validation errors.")
            validation_errors = []

        errors_range = np.arange(len(train_errors))
        plot_function = ax.semilogx if logx else ax.plot

        line_error_in, = plot_function(errors_range, train_errors)

        if validation_errors:
            line_error_out, = plot_function(errors_range, validation_errors)
            ax.legend(
                [line_error_in, line_error_out],
                ['Train', 'Validation']
            )

        ax.set_title('Training perfomance')
        ax.set_ylim(bottom=0)

        ax.set_ylabel('Error')
        ax.set_xlabel('Epoch')

        if show:
            plt.show()

        return ax
Plot line plot that shows training progress. x-axis
dataset/ETHPy150Open itdxer/neupy/neupy/network/base.py/BaseNetwork.plot_errors