summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_models.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_models.py b/tests/test_models.py
index 7994e86..b6fec4d 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -48,6 +48,15 @@ def test_transformer_integers_mode():
assert out["logits"].shape == (4, b["y"].shape[1], cfg.vocab)
+def test_rnn_fully_tied_no_gru_decoder():
+ """Regression: design review fix — everything recurrent must be the ONE tied cell."""
+ import torch.nn as nn
+ cfg = Config(model="rnn")
+ m = build_model(cfg)
+ assert not any(isinstance(mod, nn.GRUCell) for mod in m.modules())
+ assert not any(isinstance(mod, (nn.GRU, nn.LSTM, nn.RNN)) for mod in m.modules())
+
+
def test_param_counts_logged_not_gated():
r = build_model(Config(model="rnn")).param_count()
t = build_model(Config(model="transformer")).param_count()