Commit cadd3bad authored by syiming's avatar syiming
Browse files

add unit test for get_proposal_feature_extractor_model incorrect dimension

parent 6a2c9932
......@@ -77,3 +77,11 @@ class FasterRCNNResnetV1FPNKerasFeatureExtractorTest(tf.test.TestCase):
self.assertAllEqual(features_shapes[0].numpy(), [2, 20, 20, 256])
self.assertAllEqual(features_shapes[1].numpy(), [2, 10, 10, 256])
self.assertAllEqual(features_shapes[2].numpy(), [2, 5, 5, 256])
def test_extract_proposal_features_dies_with_incorrect_rank_inputs(self):
feature_extractor = self._build_feature_extractor()
preprocessed_inputs = tf.random_uniform(
[224, 224, 3], maxval=255, dtype=tf.float32)
with self.assertRaises(tf.errors.InvalidArgumentError):
feature_extractor.get_proposal_feature_extractor_model(
name='TestScope')(preprocessed_inputs)
\ No newline at end of file
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