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
b1a704d7
Unverified
Commit
b1a704d7
authored
Jun 22, 2018
by
Katherine Wu
Committed by
GitHub
Jun 22, 2018
Browse files
Fix transformer test (#4606)
parent
c39a88c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
official/transformer/model/beam_search_test.py
official/transformer/model/beam_search_test.py
+2
-2
No files found.
official/transformer/model/beam_search_test.py
View file @
b1a704d7
...
...
@@ -33,8 +33,8 @@ class BeamSearchHelperTests(tf.test.TestCase):
self
.
assertAllEqual
([
7
,
3
,
4
,
2
,
5
],
shape
)
def
test_shape_list
(
self
):
y
=
tf
.
constant
(
4.0
)
x
=
tf
.
ones
([
7
,
tf
.
to_int32
(
tf
.
sqrt
(
y
))
,
2
,
5
])
y
=
tf
.
placeholder
(
dtype
=
tf
.
int32
,
shape
=
[]
)
x
=
tf
.
ones
([
7
,
y
,
2
,
5
])
shape
=
beam_search
.
_shape_list
(
x
)
self
.
assertIsInstance
(
shape
[
0
],
int
)
self
.
assertIsInstance
(
shape
[
1
],
tf
.
Tensor
)
...
...
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