#NEWLINE# def test_A_reg( ) : #NEWLINE# #INDENT# ( ( X_train , Y_train ) , ( X_test , Y_test ) , test_ids ) = get_data ( ) #NEWLINE# for reg in [ regularizers . activity_l1 ( ) , regularizers . activity_l2 ( ) ] : #NEWLINE# #INDENT# model = create_model ( activity_reg = reg ) #NEWLINE# model . compile ( loss = 'categorical_crossentropy' , optimizer = 'rmsprop' ) #NEWLINE# model . fit ( X_train , Y_train , batch_size = batch_size , nb_epoch = nb_epoch , verbose = 0 ) #NEWLINE# model . evaluate ( X_test [ test_ids , : ] , Y_test [ test_ids , : ] , verbose = 0 )