Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Jul 10, 2024
1 parent 6de5e94 commit aab4e83
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_modeling_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3257,6 +3257,10 @@ def test_mismatched_shapes_have_properly_initialized_weights(self):
msg=f"Parameter {name} of model {model_class} seems not properly initialized",
)
else:
# Here we allow the parameters' mean to be in the range [-5.0, 5.0] instead of being
# either `0.0` or `1.0`, because their initializations are not using
# `config.initializer_factor` (or something similar). The purpose of this test is simply
# to make sure they are properly initialized (to avoid very large value or even `nan`).
self.assertGreaterEqual(
param_mean,
-5.0,
Expand Down

0 comments on commit aab4e83

Please sign in to comment.