#NEWLINE# def abstractfit( model , X_train , y ) : #NEWLINE# #INDENT# nfeat = X_train . shape [ 1 ] #NEWLINE# model . configs [ 'nvis' ] = nfeat #NEWLINE# dataset = model . dataset_adaptor . fit_transform ( X_train , y ) #NEWLINE# super ( type ( model ) , model ) . __init__ ( ** model . configs ) #NEWLINE# trainer = model . trainer . get_trainer ( model , dataset ) #NEWLINE# trainer . main_loop ( ) #NEWLINE# X = tensor . matrix ( ) #NEWLINE# ff = theano . function ( [ model ] , model . fprop ( X ) ) #NEWLINE# model . estimator = ff #NEWLINE# return model