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
9abd85f2
Commit
9abd85f2
authored
Mar 18, 2021
by
Yeqing Li
Committed by
A. Unique TensorFlower
Mar 18, 2021
Browse files
Fixes typos and use string for endpoints key.
PiperOrigin-RevId: 363736548
parent
dc04b2b0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
official/vision/beta/modeling/backbones/resnet_3d.py
official/vision/beta/modeling/backbones/resnet_3d.py
+1
-1
official/vision/beta/modeling/backbones/resnet_3d_test.py
official/vision/beta/modeling/backbones/resnet_3d_test.py
+4
-4
official/vision/beta/modeling/layers/nn_blocks_3d.py
official/vision/beta/modeling/layers/nn_blocks_3d.py
+1
-1
No files found.
official/vision/beta/modeling/backbones/resnet_3d.py
View file @
9abd85f2
...
...
@@ -163,7 +163,7 @@ class ResNet3D(tf.keras.Model):
block_repeats
=
resnet_spec
[
2
],
use_self_gating
=
use_self_gating
[
i
]
if
use_self_gating
else
False
,
name
=
'block_group_l{}'
.
format
(
i
+
2
))
endpoints
[
i
+
2
]
=
x
endpoints
[
str
(
i
+
2
)
]
=
x
self
.
_output_specs
=
{
l
:
endpoints
[
l
].
get_shape
()
for
l
in
endpoints
}
...
...
official/vision/beta/modeling/backbones/resnet_3d_test.py
View file @
9abd85f2
...
...
@@ -47,16 +47,16 @@ class ResNet3DTest(parameterized.TestCase, tf.test.TestCase):
self
.
assertAllEqual
([
1
,
2
,
input_size
/
2
**
2
,
input_size
/
2
**
2
,
64
*
endpoint_filter_scale
],
endpoints
[
2
].
shape
.
as_list
())
],
endpoints
[
'2'
].
shape
.
as_list
())
self
.
assertAllEqual
([
1
,
2
,
input_size
/
2
**
3
,
input_size
/
2
**
3
,
128
*
endpoint_filter_scale
],
endpoints
[
3
].
shape
.
as_list
())
],
endpoints
[
'3'
].
shape
.
as_list
())
self
.
assertAllEqual
([
1
,
2
,
input_size
/
2
**
4
,
input_size
/
2
**
4
,
256
*
endpoint_filter_scale
],
endpoints
[
4
].
shape
.
as_list
())
],
endpoints
[
'4'
].
shape
.
as_list
())
self
.
assertAllEqual
([
1
,
2
,
input_size
/
2
**
5
,
input_size
/
2
**
5
,
512
*
endpoint_filter_scale
],
endpoints
[
5
].
shape
.
as_list
())
],
endpoints
[
'5'
].
shape
.
as_list
())
def
test_serialize_deserialize
(
self
):
# Create a network object that sets all of its config options.
...
...
official/vision/beta/modeling/layers/nn_blocks_3d.py
View file @
9abd85f2
...
...
@@ -210,7 +210,7 @@ class BottleneckBlock3D(tf.keras.layers.Layer):
'temporal_kernel_size'
:
self
.
_temporal_kernel_size
,
'temporal_strides'
:
self
.
_temporal_strides
,
'spatial_strides'
:
self
.
_spatial_strides
,
'use_
projection
'
:
self
.
_use_
projection
,
'use_
self_gating
'
:
self
.
_use_
self_gating
,
'kernel_initializer'
:
self
.
_kernel_initializer
,
'kernel_regularizer'
:
self
.
_kernel_regularizer
,
'bias_regularizer'
:
self
.
_bias_regularizer
,
...
...
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