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
7e18563f
"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "6a07344786bf06fe27b188e6a3c97c478386808a"
Commit
7e18563f
authored
May 05, 2021
by
Xianzhi Du
Committed by
A. Unique TensorFlower
May 05, 2021
Browse files
Internal change
PiperOrigin-RevId: 372184016
parent
52d9dfa1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
official/vision/beta/modeling/backbones/spinenet_mobile.py
official/vision/beta/modeling/backbones/spinenet_mobile.py
+6
-2
No files found.
official/vision/beta/modeling/backbones/spinenet_mobile.py
View file @
7e18563f
...
@@ -320,6 +320,9 @@ class SpineNetMobile(tf.keras.Model):
...
@@ -320,6 +320,9 @@ class SpineNetMobile(tf.keras.Model):
endpoints
=
{}
endpoints
=
{}
for
i
,
block_spec
in
enumerate
(
self
.
_block_specs
):
for
i
,
block_spec
in
enumerate
(
self
.
_block_specs
):
# Update block level if it is larger than max_level to avoid building
# blocks smaller than requested.
block_spec
.
level
=
min
(
block_spec
.
level
,
self
.
_max_level
)
# Find out specs for the target block.
# Find out specs for the target block.
target_width
=
int
(
math
.
ceil
(
input_width
/
2
**
block_spec
.
level
))
target_width
=
int
(
math
.
ceil
(
input_width
/
2
**
block_spec
.
level
))
target_num_filters
=
int
(
FILTER_SIZE_MAP
[
block_spec
.
level
]
*
target_num_filters
=
int
(
FILTER_SIZE_MAP
[
block_spec
.
level
]
*
...
@@ -392,8 +395,9 @@ class SpineNetMobile(tf.keras.Model):
...
@@ -392,8 +395,9 @@ class SpineNetMobile(tf.keras.Model):
block_spec
.
level
))
block_spec
.
level
))
if
(
block_spec
.
level
<
self
.
_min_level
or
if
(
block_spec
.
level
<
self
.
_min_level
or
block_spec
.
level
>
self
.
_max_level
):
block_spec
.
level
>
self
.
_max_level
):
raise
ValueError
(
'Output level is out of range [{}, {}]'
.
format
(
logging
.
warning
(
self
.
_min_level
,
self
.
_max_level
))
'SpineNet output level out of range [min_level, max_levle] = [%s, %s] will not be used for further processing.'
,
self
.
_min_level
,
self
.
_max_level
)
endpoints
[
str
(
block_spec
.
level
)]
=
x
endpoints
[
str
(
block_spec
.
level
)]
=
x
return
endpoints
return
endpoints
...
...
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