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
1dc12711
Commit
1dc12711
authored
Sep 17, 2021
by
Cristina Vasconcelos
Committed by
A. Unique TensorFlower
Sep 17, 2021
Browse files
Internal change
PiperOrigin-RevId: 397347570
parent
605329fe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
official/vision/beta/modeling/factory.py
official/vision/beta/modeling/factory.py
+8
-3
No files found.
official/vision/beta/modeling/factory.py
View file @
1dc12711
...
...
@@ -121,8 +121,7 @@ def build_maskrcnn(
kernel_regularizer
=
l2_regularizer
,
name
=
'detection_head'
)
# Build backbone, decoder and region proposal network:
# Builds decoder and region proposal network:
if
decoder
:
decoder_features
=
decoder
(
backbone_features
)
rpn_head
(
decoder_features
)
...
...
@@ -145,6 +144,7 @@ def build_maskrcnn(
norm_epsilon
=
norm_activation_config
.
norm_epsilon
,
kernel_regularizer
=
l2_regularizer
,
name
=
'detection_head_{}'
.
format
(
cascade_num
+
1
))
detection_head_cascade
.
append
(
detection_head
)
detection_head
=
detection_head_cascade
...
...
@@ -260,7 +260,7 @@ def build_retinanet(
backbone_config
=
model_config
.
backbone
,
norm_activation_config
=
norm_activation_config
,
l2_regularizer
=
l2_regularizer
)
backbone
(
tf
.
keras
.
Input
(
input_specs
.
shape
[
1
:]))
backbone_features
=
backbone
(
tf
.
keras
.
Input
(
input_specs
.
shape
[
1
:]))
decoder
=
decoders
.
factory
.
build_decoder
(
input_specs
=
backbone
.
output_specs
,
...
...
@@ -289,6 +289,11 @@ def build_retinanet(
norm_epsilon
=
norm_activation_config
.
norm_epsilon
,
kernel_regularizer
=
l2_regularizer
)
# Builds decoder and head so that their trainable weights are initialized
if
decoder
:
decoder_features
=
decoder
(
backbone_features
)
_
=
head
(
decoder_features
)
detection_generator_obj
=
detection_generator
.
MultilevelDetectionGenerator
(
apply_nms
=
generator_config
.
apply_nms
,
pre_nms_top_k
=
generator_config
.
pre_nms_top_k
,
...
...
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