#NEWLINE# def fit( self , x , y , batch_size = 32 , nb_epoch = 10 , verbose = 1 , callbacks = [ ] , validation_split = 0.0 , validation_data = None , shuffle = True , class_weight = None , sample_weight = None , **kwargs ) : #NEWLINE# #INDENT# 'Trains the model for a fixed number of epochs.\n\n        # Arguments\n            x: input data, as a Numpy array or list of Numpy arrays\n                (if the model has multiple inputs).\n            y: labels, as a Numpy array.\n            batch_size: integer. Number of samples per gradient update.\n            nb_epoch: integer, the number of epochs to train the model.\n            verbose: 0 for no logging to stdout,\n                1 for progress bar logging, 2 for one log line per epoch.\n            callbacks: list of `keras.callbacks.Callback` instances.\n                List of callbacks to apply during training.\n                See [callbacks](/callbacks).\n            validation_split: float (0. < x < 1).\n                Fraction of the data to use as held-out validation data.\n            validation_data: tuple (X, y) to be used as held-out\n                validation data. Will override validation_split.\n            shuffle: boolean or str (for \'batch\').\n                Whether to shuffle the samples at each epoch.\n                \'batch\' is a special option for dealing with the\n                limitations of HDF5 data; it shuffles in batch-sized chunks.\n            class_weight: dictionary mapping classes to a weight value,\n                used for scaling the loss function (during training only).\n            sample_weight: Numpy array of weights for\n                the training samples, used for scaling the loss function\n                (during training only). You can either pass a flat (1D)\n                Numpy array with the same length as the input samples\n                (1:1 mapping between weights and samples),\n                or in the case of temporal data,\n                you can pass a 2D array with shape (samples, sequence_length),\n                to apply a different weight to every timestep of every sample.\n                In this case you should make sure to specify\n                sample_weight_mode="temporal" in compile().\n\n        # Returns\n            A `History` object. Its `History.history` attribute is\n            a record of training loss values and metrics values\n            at successive epochs, as well as validation loss values\n            and validation metrics values (if applicable).\n        ' #NEWLINE# if ( self . model is None ) : #NEWLINE# #INDENT# raise Exception ( 'The model needs to be compiled before being used.' ) #NEWLINE# #UNINDENT# if ( 'show_accuracy' in kwargs ) : #NEWLINE# #INDENT# kwargs . pop ( 'show_accuracy' ) #NEWLINE# warnings . warn ( 'The "show_accuracy" argument is deprecated, instead you should pass the "accuracy" metric to the model at compile time:\n`model.compile(optimizer, loss, metrics=["accuracy"])`' ) #NEWLINE# #UNINDENT# if kwargs : #NEWLINE# #INDENT# raise Exception ( ( 'Received unknown keyword arguments: ' + str ( kwargs ) ) ) #NEWLINE# #UNINDENT# return self . model . fit ( x , y , batch_size = batch_size , nb_epoch = nb_epoch , verbose = verbose , callbacks = callbacks , validation_split = validation_split , validation_data = validation_data , shuffle = shuffle , class_weight = class_weight , sample_weight = sample_weight )