#NEWLINE# def _predict( self , X ) : #NEWLINE# #INDENT# g_predict = tf . Graph ( ) #NEWLINE# with g_predict . as_default ( ) : #NEWLINE# #INDENT# w = tf . convert_to_tensor ( value = self . weights_ [ : , np . newaxis ] , dtype = self . dtype ) #NEWLINE# b = tf . convert_to_tensor ( value = self . bias_ , dtype = self . dtype ) #NEWLINE# tf_X = tf . convert_to_tensor ( value = X , dtype = self . dtype ) #NEWLINE# predict_init = tf . initialize_all_variables ( ) #NEWLINE# #UNINDENT# sess = tf . Session ( graph = g_predict ) #NEWLINE# with sess : #NEWLINE# #INDENT# sess . run ( w ) #NEWLINE# return self . _net_input ( tf_X , w , b ) . eval ( )