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
chenpangpang
transformers
Commits
e1b7e10d
Commit
e1b7e10d
authored
Nov 23, 2020
by
LysandreJik
Browse files
Update TF BERT test
parent
8ffc01a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests/test_modeling_tf_bert.py
tests/test_modeling_tf_bert.py
+4
-4
No files found.
tests/test_modeling_tf_bert.py
View file @
e1b7e10d
...
...
@@ -348,7 +348,7 @@ class TFBertModelIntegrationTest(unittest.TestCase):
input_ids
=
tf
.
constant
([[
0
,
1
,
2
,
3
,
4
,
5
]])
output
=
model
(
input_ids
)[
0
]
expected_shape
=
[
1
,
6
,
1
0
]
expected_shape
=
[
1
,
6
,
3200
0
]
self
.
assertEqual
(
output
.
shape
,
expected_shape
)
print
(
output
[:,
:
3
,
:
3
])
...
...
@@ -356,9 +356,9 @@ class TFBertModelIntegrationTest(unittest.TestCase):
expected_slice
=
tf
.
constant
(
[
[
[
0.0
370695
7
,
0.
1012491
9
,
0.0
3616843
],
[
-
0.0
6099961
,
0.0
2266058
,
0.00601412
],
[
-
0.0
6066202
,
0.05684517
,
0.02038802
],
[
-
0.0
524319
7
,
-
0.
0449889
9
,
0.0
5512108
],
[
-
0.0
7444685
,
-
0.0
1064632
,
0.04352357
],
[
-
0.0
5020351
,
0.05530146
,
0.00700043
]
]
]
)
...
...
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