Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
1c6ba420
Commit
1c6ba420
authored
Jun 28, 2020
by
syiming
Browse files
move variable to a list
parent
7c4ca261
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
research/object_detection/meta_architectures/faster_rcnn_meta_arch.py
...ect_detection/meta_architectures/faster_rcnn_meta_arch.py
+4
-2
No files found.
research/object_detection/meta_architectures/faster_rcnn_meta_arch.py
View file @
1c6ba420
...
@@ -1308,7 +1308,7 @@ class FasterRCNNMetaArch(model.DetectionModel):
...
@@ -1308,7 +1308,7 @@ class FasterRCNNMetaArch(model.DetectionModel):
rpn_features_to_crop: A list of 4-D float32 tensor with shape
rpn_features_to_crop: A list of 4-D float32 tensor with shape
[batch, height, width, depth] representing image features to crop using
[batch, height, width, depth] representing image features to crop using
the proposals boxes.
the proposals boxes.
anchors: A BoxList representing anchors (for the RPN) in
anchors: A
list of
BoxList representing anchors (for the RPN) in
absolute coordinates.
absolute coordinates.
image_shape: A 1-D tensor representing the input image shape.
image_shape: A 1-D tensor representing the input image shape.
"""
"""
...
@@ -1322,11 +1322,13 @@ class FasterRCNNMetaArch(model.DetectionModel):
...
@@ -1322,11 +1322,13 @@ class FasterRCNNMetaArch(model.DetectionModel):
rpn_features_to_crop
=
[
rpn_features_to_crop
]
rpn_features_to_crop
=
[
rpn_features_to_crop
]
rpn_box_predictor_features
=
[]
rpn_box_predictor_features
=
[]
anchors
=
[]
for
single_rpn_features_to_crop
in
rpn_features_to_crop
:
for
single_rpn_features_to_crop
in
rpn_features_to_crop
:
feature_map_shape
=
tf
.
shape
(
single_rpn_features_to_crop
)
feature_map_shape
=
tf
.
shape
(
single_rpn_features_to_crop
)
anchors
=
box_list_ops
.
concatenate
(
level_
anchors
=
box_list_ops
.
concatenate
(
self
.
_first_stage_anchor_generator
.
generate
([(
feature_map_shape
[
1
],
self
.
_first_stage_anchor_generator
.
generate
([(
feature_map_shape
[
1
],
feature_map_shape
[
2
])]))
feature_map_shape
[
2
])]))
anchors
.
append
(
level_anchors
)
single_rpn_box_predictor_features
=
(
single_rpn_box_predictor_features
=
(
self
.
_first_stage_box_predictor_first_conv
(
single_rpn_features_to_crop
))
self
.
_first_stage_box_predictor_first_conv
(
single_rpn_features_to_crop
))
rpn_box_predictor_features
.
append
(
single_rpn_box_predictor_features
)
rpn_box_predictor_features
.
append
(
single_rpn_box_predictor_features
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment