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
2de518be
Commit
2de518be
authored
Jul 26, 2021
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 387004613
parent
4afec6ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
official/vision/beta/modeling/backbones/spinenet.py
official/vision/beta/modeling/backbones/spinenet.py
+6
-3
official/vision/beta/modeling/backbones/spinenet_mobile.py
official/vision/beta/modeling/backbones/spinenet_mobile.py
+6
-3
No files found.
official/vision/beta/modeling/backbones/spinenet.py
View file @
2de518be
...
...
@@ -130,7 +130,7 @@ class SpineNet(tf.keras.Model):
def
__init__
(
self
,
input_specs
:
tf
.
keras
.
layers
.
InputSpec
=
tf
.
keras
.
layers
.
InputSpec
(
shape
=
[
None
,
640
,
640
,
3
]),
shape
=
[
None
,
None
,
None
,
3
]),
min_level
:
int
=
3
,
max_level
:
int
=
7
,
block_specs
:
List
[
BlockSpec
]
=
build_block_specs
(),
...
...
@@ -214,8 +214,11 @@ class SpineNet(tf.keras.Model):
inputs
=
tf
.
keras
.
Input
(
shape
=
input_specs
.
shape
[
1
:])
net
=
self
.
_build_stem
(
inputs
=
inputs
)
net
=
self
.
_build_scale_permuted_network
(
net
=
net
,
input_width
=
input_specs
.
shape
[
2
])
input_width
=
input_specs
.
shape
[
2
]
if
input_width
is
None
:
max_stride
=
max
(
map
(
lambda
b
:
b
.
level
,
block_specs
))
input_width
=
2
**
max_stride
net
=
self
.
_build_scale_permuted_network
(
net
=
net
,
input_width
=
input_width
)
endpoints
=
self
.
_build_endpoints
(
net
=
net
)
self
.
_output_specs
=
{
l
:
endpoints
[
l
].
get_shape
()
for
l
in
endpoints
}
...
...
official/vision/beta/modeling/backbones/spinenet_mobile.py
View file @
2de518be
...
...
@@ -135,7 +135,7 @@ class SpineNetMobile(tf.keras.Model):
def
__init__
(
self
,
input_specs
:
tf
.
keras
.
layers
.
InputSpec
=
tf
.
keras
.
layers
.
InputSpec
(
shape
=
[
None
,
512
,
512
,
3
]),
shape
=
[
None
,
None
,
None
,
3
]),
min_level
:
int
=
3
,
max_level
:
int
=
7
,
block_specs
:
List
[
BlockSpec
]
=
build_block_specs
(),
...
...
@@ -219,8 +219,11 @@ class SpineNetMobile(tf.keras.Model):
inputs
=
tf
.
keras
.
Input
(
shape
=
input_specs
.
shape
[
1
:])
net
=
self
.
_build_stem
(
inputs
=
inputs
)
net
=
self
.
_build_scale_permuted_network
(
net
=
net
,
input_width
=
input_specs
.
shape
[
2
])
input_width
=
input_specs
.
shape
[
2
]
if
input_width
is
None
:
max_stride
=
max
(
map
(
lambda
b
:
b
.
level
,
block_specs
))
input_width
=
2
**
max_stride
net
=
self
.
_build_scale_permuted_network
(
net
=
net
,
input_width
=
input_width
)
endpoints
=
self
.
_build_endpoints
(
net
=
net
)
self
.
_output_specs
=
{
l
:
endpoints
[
l
].
get_shape
()
for
l
in
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