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
f13895b9
Commit
f13895b9
authored
Jun 21, 2021
by
Xianzhi Du
Committed by
A. Unique TensorFlower
Jun 21, 2021
Browse files
Internal change
PiperOrigin-RevId: 380687139
parent
735e95e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
official/vision/beta/modeling/backbones/spinenet.py
official/vision/beta/modeling/backbones/spinenet.py
+4
-2
official/vision/beta/modeling/backbones/spinenet_test.py
official/vision/beta/modeling/backbones/spinenet_test.py
+7
-8
No files found.
official/vision/beta/modeling/backbones/spinenet.py
View file @
f13895b9
...
@@ -393,8 +393,10 @@ class SpineNet(tf.keras.Model):
...
@@ -393,8 +393,10 @@ class SpineNet(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_level] = '
'[%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
...
...
official/vision/beta/modeling/backbones/spinenet_test.py
View file @
f13895b9
...
@@ -24,17 +24,16 @@ from official.vision.beta.modeling.backbones import spinenet
...
@@ -24,17 +24,16 @@ from official.vision.beta.modeling.backbones import spinenet
class
SpineNetTest
(
parameterized
.
TestCase
,
tf
.
test
.
TestCase
):
class
SpineNetTest
(
parameterized
.
TestCase
,
tf
.
test
.
TestCase
):
@
parameterized
.
parameters
(
@
parameterized
.
parameters
(
(
128
,
0.65
,
1
,
0.5
,
128
),
(
128
,
0.65
,
1
,
0.5
,
128
,
4
,
6
),
(
256
,
1.0
,
1
,
0.5
,
256
),
(
256
,
1.0
,
1
,
0.5
,
256
,
3
,
6
),
(
384
,
1.0
,
2
,
0.5
,
256
),
(
384
,
1.0
,
2
,
0.5
,
256
,
4
,
7
),
(
512
,
1.0
,
3
,
1.0
,
256
),
(
512
,
1.0
,
3
,
1.0
,
256
,
3
,
7
),
(
640
,
1.3
,
4
,
1.0
,
384
),
(
640
,
1.3
,
4
,
1.0
,
384
,
3
,
7
),
)
)
def
test_network_creation
(
self
,
input_size
,
filter_size_scale
,
block_repeats
,
def
test_network_creation
(
self
,
input_size
,
filter_size_scale
,
block_repeats
,
resample_alpha
,
endpoints_num_filters
):
resample_alpha
,
endpoints_num_filters
,
min_level
,
max_level
):
"""Test creation of SpineNet models."""
"""Test creation of SpineNet models."""
min_level
=
3
max_level
=
7
tf
.
keras
.
backend
.
set_image_data_format
(
'channels_last'
)
tf
.
keras
.
backend
.
set_image_data_format
(
'channels_last'
)
...
...
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