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
f8ff3fad
Unverified
Commit
f8ff3fad
authored
Feb 18, 2022
by
Yih-Dar
Committed by
GitHub
Feb 18, 2022
Browse files
TF: add initializer_std with a small value in TFFunnelModelTester (#15684)
parent
416dff73
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
tests/test_modeling_tf_funnel.py
tests/test_modeling_tf_funnel.py
+3
-0
No files found.
tests/test_modeling_tf_funnel.py
View file @
f8ff3fad
...
@@ -63,6 +63,7 @@ class TFFunnelModelTester:
...
@@ -63,6 +63,7 @@ class TFFunnelModelTester:
activation_dropout
=
0.0
,
activation_dropout
=
0.0
,
max_position_embeddings
=
512
,
max_position_embeddings
=
512
,
type_vocab_size
=
3
,
type_vocab_size
=
3
,
initializer_std
=
0.02
,
# Set to a smaller value, so we can keep the small error threshold (1e-5) in the test
num_labels
=
3
,
num_labels
=
3
,
num_choices
=
4
,
num_choices
=
4
,
scope
=
None
,
scope
=
None
,
...
@@ -92,6 +93,7 @@ class TFFunnelModelTester:
...
@@ -92,6 +93,7 @@ class TFFunnelModelTester:
self
.
num_labels
=
num_labels
self
.
num_labels
=
num_labels
self
.
num_choices
=
num_choices
self
.
num_choices
=
num_choices
self
.
scope
=
scope
self
.
scope
=
scope
self
.
initializer_std
=
initializer_std
# Used in the tests to check the size of the first attention layer
# Used in the tests to check the size of the first attention layer
self
.
num_attention_heads
=
n_head
self
.
num_attention_heads
=
n_head
...
@@ -137,6 +139,7 @@ class TFFunnelModelTester:
...
@@ -137,6 +139,7 @@ class TFFunnelModelTester:
activation_dropout
=
self
.
activation_dropout
,
activation_dropout
=
self
.
activation_dropout
,
max_position_embeddings
=
self
.
max_position_embeddings
,
max_position_embeddings
=
self
.
max_position_embeddings
,
type_vocab_size
=
self
.
type_vocab_size
,
type_vocab_size
=
self
.
type_vocab_size
,
initializer_std
=
self
.
initializer_std
,
)
)
return
(
return
(
...
...
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