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
7d5b6be3
Commit
7d5b6be3
authored
May 18, 2021
by
Dan Kondratyuk
Committed by
A. Unique TensorFlower
May 18, 2021
Browse files
Fix movinet tests. Use fixed input and float32 operations.
PiperOrigin-RevId: 374552006
parent
f7938e6a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
official/vision/beta/projects/movinet/modeling/movinet_model_test.py
...sion/beta/projects/movinet/modeling/movinet_model_test.py
+2
-2
official/vision/beta/projects/movinet/train_test.py
official/vision/beta/projects/movinet/train_test.py
+4
-0
No files found.
official/vision/beta/projects/movinet/modeling/movinet_model_test.py
View file @
7d5b6be3
...
...
@@ -162,14 +162,14 @@ class MovinetModelTest(parameterized.TestCase, tf.test.TestCase):
weights
.
append
(
weight
)
model_2plus1d
.
set_weights
(
weights
)
inputs
=
np
.
random
.
rand
(
2
,
8
,
172
,
172
,
3
)
inputs
=
tf
.
ones
([
2
,
8
,
172
,
172
,
3
],
dtype
=
tf
.
float32
)
logits_2plus1d
=
model_2plus1d
(
inputs
)
logits_3d_2plus1d
=
model_3d_2plus1d
(
inputs
)
# Ensure both models have the same output, since the weights are the same
self
.
assertAllEqual
(
logits_2plus1d
.
shape
,
logits_3d_2plus1d
.
shape
)
self
.
assertAllClose
(
logits_2plus1d
,
logits_3d_2plus1d
)
self
.
assertAllClose
(
logits_2plus1d
,
logits_3d_2plus1d
,
1e-5
,
1e-5
)
if
__name__
==
'__main__'
:
...
...
official/vision/beta/projects/movinet/train_test.py
View file @
7d5b6be3
...
...
@@ -61,6 +61,10 @@ class TrainTest(tf.test.TestCase):
# Test model training pipeline runs.
params_override
=
json
.
dumps
({
'runtime'
:
{
'distribution_strategy'
:
'mirrored'
,
'mixed_precision_dtype'
:
'float32'
,
},
'trainer'
:
{
'train_steps'
:
2
,
'validation_steps'
:
2
,
...
...
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