@@ -237,49 +237,31 @@ def predict( # pylint: disable=W0221
237237 :param training_mode: `True` for model set to training mode and `'False` for model set to evaluation mode.
238238 :return: Array of predictions of shape `(num_inputs, nb_classes)`.
239239 """
240- print ("predict - a" )
241240 if self ._learning is not None :
242241 self ._feed_dict [self ._learning ] = training_mode
243242
244- print ("predict - b" )
245-
246243 # Apply preprocessing
247244 x_preprocessed , _ = self ._apply_preprocessing (x , y = None , fit = False )
248245
249- print ("predict - c" )
250-
251246 # Run prediction with batch processing
252247 results = np .zeros ((x_preprocessed .shape [0 ], self .nb_classes ), dtype = np .float32 )
253248 num_batch = int (np .ceil (len (x_preprocessed ) / float (batch_size )))
254- print ("predict - c2" )
255- print ("num_batch" , num_batch )
256249 for m in range (num_batch ):
257- print ("predict -" , m , " - d" )
258250 # Batch indexes
259251 begin , end = (
260252 m * batch_size ,
261253 min ((m + 1 ) * batch_size , x_preprocessed .shape [0 ]),
262254 )
263255
264- print ("predict -" , m , " - e" )
265-
266256 # Create feed_dict
267257 feed_dict = {self ._input_ph : x_preprocessed [begin :end ]}
268258 feed_dict .update (self ._feed_dict )
269259
270- print ("predict -" , m , " - f" )
271-
272260 # Run prediction
273- print ("feed_dict" )
274- print (feed_dict )
275261 results [begin :end ] = self ._sess .run (self ._output , feed_dict = feed_dict )
276262
277- print ("predict -" , m , " - g" )
278-
279263 # Apply postprocessing
280- print ("predict - h" )
281264 predictions = self ._apply_postprocessing (preds = results , fit = False )
282- print ("predict - i" )
283265
284266 return predictions
285267
0 commit comments