From b2027cbbb532ff3bdbee582dfbaa871350305b29 Mon Sep 17 00:00:00 2001 From: ianbulovic Date: Thu, 9 Apr 2026 11:27:34 -0400 Subject: [PATCH] get batch_size and seq_len from encoder outputs instead of inputs --- src/cnlpt/modeling/models/projection_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cnlpt/modeling/models/projection_model.py b/src/cnlpt/modeling/models/projection_model.py index 5a134040..8838ca43 100644 --- a/src/cnlpt/modeling/models/projection_model.py +++ b/src/cnlpt/modeling/models/projection_model.py @@ -293,7 +293,7 @@ def forward( outputs = self.encoder(input_ids, **kwargs) - batch_size, seq_len = input_ids.shape + batch_size, seq_len, _ = outputs.last_hidden_state.shape logits = []