From f8ff3fad87e30c9da27984fea1fdb133ed2d5a55 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Fri, 18 Feb 2022 12:20:07 +0100 Subject: [PATCH] TF: add initializer_std with a small value in TFFunnelModelTester (#15684) --- tests/test_modeling_tf_funnel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_modeling_tf_funnel.py b/tests/test_modeling_tf_funnel.py index 094f1af079..524becbb00 100644 --- a/tests/test_modeling_tf_funnel.py +++ b/tests/test_modeling_tf_funnel.py @@ -63,6 +63,7 @@ class TFFunnelModelTester: activation_dropout=0.0, max_position_embeddings=512, 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_choices=4, scope=None, @@ -92,6 +93,7 @@ class TFFunnelModelTester: self.num_labels = num_labels self.num_choices = num_choices self.scope = scope + self.initializer_std = initializer_std # Used in the tests to check the size of the first attention layer self.num_attention_heads = n_head @@ -137,6 +139,7 @@ class TFFunnelModelTester: activation_dropout=self.activation_dropout, max_position_embeddings=self.max_position_embeddings, type_vocab_size=self.type_vocab_size, + initializer_std=self.initializer_std, ) return (