"...resnet50_tensorflow.git" did not exist on "09aeecd6d7d827b5f29e159c7665502dc599b1aa"
Commit 7c4ca261 authored by syiming's avatar syiming
Browse files

Change testcase that been affected by changing the output and input

format:

1. Change rpn_features_to_crop into a list
2. change rpn_box_predictor_features into a list
parent 28d7aac1
...@@ -484,8 +484,9 @@ class FasterRCNNMetaArchTest( ...@@ -484,8 +484,9 @@ class FasterRCNNMetaArchTest(
'mask_predictions': 'mask_predictions':
mask_predictions, mask_predictions,
'rpn_features_to_crop': 'rpn_features_to_crop':
rpn_features_to_crop [rpn_features_to_crop]
}, true_image_shapes) }, true_image_shapes)
print("here")
self.assertIn('detection_features', detections) self.assertIn('detection_features', detections)
return (detections['detection_boxes'], detections['detection_scores'], return (detections['detection_boxes'], detections['detection_scores'],
detections['detection_classes'], detections['num_detections'], detections['detection_classes'], detections['num_detections'],
......
...@@ -479,8 +479,8 @@ class FasterRCNNMetaArchTestBase(test_case.TestCase, parameterized.TestCase): ...@@ -479,8 +479,8 @@ class FasterRCNNMetaArchTestBase(test_case.TestCase, parameterized.TestCase):
preprocessed_inputs, true_image_shapes = model.preprocess(images) preprocessed_inputs, true_image_shapes = model.preprocess(images)
prediction_dict = model.predict(preprocessed_inputs, true_image_shapes) prediction_dict = model.predict(preprocessed_inputs, true_image_shapes)
return (prediction_dict['rpn_box_predictor_features'], return (prediction_dict['rpn_box_predictor_features'][0],
prediction_dict['rpn_features_to_crop'], prediction_dict['rpn_features_to_crop'][0],
prediction_dict['image_shape'], prediction_dict['image_shape'],
prediction_dict['rpn_box_encodings'], prediction_dict['rpn_box_encodings'],
prediction_dict['rpn_objectness_predictions_with_background'], prediction_dict['rpn_objectness_predictions_with_background'],
...@@ -601,9 +601,9 @@ class FasterRCNNMetaArchTestBase(test_case.TestCase, parameterized.TestCase): ...@@ -601,9 +601,9 @@ class FasterRCNNMetaArchTestBase(test_case.TestCase, parameterized.TestCase):
def compare_results(results, expected_output_shapes): def compare_results(results, expected_output_shapes):
"""Checks if the shape of the predictions are as expected.""" """Checks if the shape of the predictions are as expected."""
self.assertAllEqual(results[0].shape, self.assertAllEqual(results[0][0].shape,
expected_output_shapes['rpn_box_predictor_features']) expected_output_shapes['rpn_box_predictor_features'])
self.assertAllEqual(results[1].shape, self.assertAllEqual(results[1][0].shape,
expected_output_shapes['rpn_features_to_crop']) expected_output_shapes['rpn_features_to_crop'])
self.assertAllEqual(results[2].shape, self.assertAllEqual(results[2].shape,
expected_output_shapes['image_shape']) expected_output_shapes['image_shape'])
...@@ -746,8 +746,8 @@ class FasterRCNNMetaArchTestBase(test_case.TestCase, parameterized.TestCase): ...@@ -746,8 +746,8 @@ class FasterRCNNMetaArchTestBase(test_case.TestCase, parameterized.TestCase):
result_tensor_dict['anchors'], result_tensor_dict['anchors'],
result_tensor_dict['rpn_box_encodings'], result_tensor_dict['rpn_box_encodings'],
result_tensor_dict['rpn_objectness_predictions_with_background'], result_tensor_dict['rpn_objectness_predictions_with_background'],
result_tensor_dict['rpn_features_to_crop'], result_tensor_dict['rpn_features_to_crop'][0],
result_tensor_dict['rpn_box_predictor_features'], result_tensor_dict['rpn_box_predictor_features'][0],
result_tensor_dict['final_anchors'], result_tensor_dict['final_anchors'],
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment