#NEWLINE# def train( self , rdd , nb_epoch = 10 , batch_size = 32 , verbose = 0 , validation_split = 0.1 ) : #NEWLINE# #INDENT# '\n        Train an elephas model.\n        ' #NEWLINE# rdd = rdd . repartition ( self . num_workers ) #NEWLINE# master_url = self . determine_master ( ) #NEWLINE# if ( self . mode in [ 'asynchronous' , 'synchronous' , 'hogwild' ] ) : #NEWLINE# #INDENT# self . _train ( rdd , nb_epoch , validation_split , verbose , validation_split , master_url ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( 'Choose from one of the modes: asynchronous, synchronous or hogwild' )