@@ -168,7 +168,7 @@ def test_draw_bounding_boxes_on_image_tensors(self):
168168 min_score_thresh = 0.2 ,
169169 keypoint_edges = keypoint_edges ))
170170
171- with self .test_session () as sess :
171+ with self .session () as sess :
172172 sess .run (tf .global_variables_initializer ())
173173
174174 # Write output images for visualization.
@@ -215,7 +215,7 @@ def test_draw_bounding_boxes_on_image_tensors_with_track_ids(self):
215215 track_ids = track_ids ,
216216 min_score_thresh = 0.2 ))
217217
218- with self .test_session () as sess :
218+ with self .session () as sess :
219219 sess .run (tf .global_variables_initializer ())
220220
221221 # Write output images for visualization.
@@ -251,7 +251,7 @@ def test_draw_bounding_boxes_on_image_tensors_with_additional_channels(self):
251251 category_index ,
252252 min_score_thresh = 0.2 ))
253253
254- with self .test_session () as sess :
254+ with self .session () as sess :
255255 sess .run (tf .global_variables_initializer ())
256256
257257 final_images_np = sess .run (images_with_boxes )
@@ -280,7 +280,7 @@ def test_draw_bounding_boxes_on_image_tensors_grayscale(self):
280280 true_image_shape = image_shape ,
281281 min_score_thresh = 0.2 ))
282282
283- with self .test_session () as sess :
283+ with self .session () as sess :
284284 sess .run (tf .global_variables_initializer ())
285285
286286 final_images_np = sess .run (images_with_boxes )
@@ -336,15 +336,15 @@ def test_add_cdf_image_summary(self):
336336 values = [0.1 , 0.2 , 0.3 , 0.4 , 0.42 , 0.44 , 0.46 , 0.48 , 0.50 ]
337337 vis_utils .add_cdf_image_summary (values , 'PositiveAnchorLoss' )
338338 cdf_image_summary = tf .get_collection (key = tf .GraphKeys .SUMMARIES )[0 ]
339- with self .test_session ():
339+ with self .session ():
340340 cdf_image_summary .eval ()
341341
342342 def test_add_hist_image_summary (self ):
343343 values = [0.1 , 0.2 , 0.3 , 0.4 , 0.42 , 0.44 , 0.46 , 0.48 , 0.50 ]
344344 bins = [0.01 * i for i in range (101 )]
345345 vis_utils .add_hist_image_summary (values , bins , 'ScoresDistribution' )
346346 hist_image_summary = tf .get_collection (key = tf .GraphKeys .SUMMARIES )[0 ]
347- with self .test_session ():
347+ with self .session ():
348348 hist_image_summary .eval ()
349349
350350 def test_eval_metric_ops (self ):
@@ -392,7 +392,7 @@ def test_eval_metric_ops(self):
392392 metric_ops = eval_metric_ops .get_estimator_eval_metric_ops (eval_dict )
393393 _ , update_op = metric_ops [next (six .iterkeys (metric_ops ))]
394394
395- with self .test_session () as sess :
395+ with self .session () as sess :
396396 sess .run (tf .global_variables_initializer ())
397397 value_ops = {}
398398 for key , (value_op , _ ) in six .iteritems (metric_ops ):
0 commit comments