(self, x, y, sample_weight=None, **kwargs)
return history
Call the super class' fit method and store metrics from the history.
        Also cater for multi-step predictions.
Call the super class' fit method and store metrics from the history.
        Also cater for multi-step predictions.
Call the super class fit method and store metrics from the history . Also cater for multi - step predictions .
def fit(self, x, y, sample_weight=None, **kwargs):
        """
        Call the super class' fit method and store metrics from the history.
        Also cater for multi-step predictions.
        """

        # Match the samples to the targets. 
        # x and y can be out of sync due to dropped samples in the Reshaper transformer.
        if len(y) > len(x):
            y = y[len(y)-len(x):] 
        
        # Fit the model to the data and store information on the training
        history = super().fit(x, y, sample_weight, **kwargs)

        sys.stdout.write("\n\nKeras Model Summary:\n")
        self.model.summary()
        sys.stdout.write("\n\n")

        # Set up a data frame with the epochs and a counter to track multiple histories
        history_df = pd.DataFrame({'iteration': self.iteration+1, 'epoch': history.epoch})

        # Add a column per metric for each epoch e.g. loss, acc
        for key in history.history:
            history_df[key] = pd.Series(history.history[key])

        # Concatenate results from the training to the history data frame
        self.histories = pd.concat([self.histories, history_df], sort=True).sort_values(by=['iteration', 'epoch']).reset_index(drop=True)
        self.iteration += 1

        return history
def fit ( self , x , y , sample_weight = None , * * kwargs ) : # Match the samples to the targets.  # x and y can be out of sync due to dropped samples in the Reshaper transformer. if len ( y ) > len ( x ) : y = y [ len ( y ) - len ( x ) : ] # Fit the model to the data and store information on the training history = super ( ) . fit ( x , y , sample_weight , * * kwargs ) sys . stdout . write ( "\n\nKeras Model Summary:\n" ) self . model . summary ( ) sys . stdout . write ( "\n\n" ) # Set up a data frame with the epochs and a counter to track multiple histories history_df = pd . DataFrame ( { 'iteration' : self . iteration + 1 , 'epoch' : history . epoch } ) # Add a column per metric for each epoch e.g. loss, acc for key in history . history : history_df [ key ] = pd . Series ( history . history [ key ] ) # Concatenate results from the training to the history data frame self . histories = pd . concat ( [ self . histories , history_df ] , sort = True ) . sort_values ( by = [ 'iteration' , 'epoch' ] ) . reset_index ( drop = True ) self . iteration += 1 return history