Commit 938f102d authored by syiming's avatar syiming
Browse files

reshape output for second stage

parent 086d3873
...@@ -265,7 +265,8 @@ class FasterRCNNResnetV1FpnKerasFeatureExtractor( ...@@ -265,7 +265,8 @@ class FasterRCNNResnetV1FpnKerasFeatureExtractor(
feature_extractor_model = tf.keras.models.Sequential([ feature_extractor_model = tf.keras.models.Sequential([
tf.keras.layers.Flatten(), tf.keras.layers.Flatten(),
tf.keras.layers.Dense(units=1024, activation='relu'), tf.keras.layers.Dense(units=1024, activation='relu'),
tf.keras.layers.Dense(units=1024, activation='relu') tf.keras.layers.Dense(units=1024, activation='relu'),
tf.keras.layers.Reshape((1, 1, 1024))
]) ])
return feature_extractor_model return feature_extractor_model
......
...@@ -91,4 +91,4 @@ class FasterRCNNResnetV1FpnKerasFeatureExtractorTest(tf.test.TestCase): ...@@ -91,4 +91,4 @@ class FasterRCNNResnetV1FpnKerasFeatureExtractorTest(tf.test.TestCase):
model(proposal_feature_maps)) model(proposal_feature_maps))
features_shape = tf.shape(proposal_classifier_features) features_shape = tf.shape(proposal_classifier_features)
self.assertAllEqual(features_shape.numpy(), [3, 1024]) self.assertAllEqual(features_shape.numpy(), [3, 1, 1, 1024])
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