From 5c1ab8ccecb83378b509c9eb22d13eb2b1ac55e5 Mon Sep 17 00:00:00 2001 From: kay1-2-3 Date: Mon, 16 Mar 2026 13:50:43 -0700 Subject: [PATCH] Fix XLS-R audio classification: remove strict pooling assertion in get_pooling_layer Made-with: Cursor --- fairseq/models/wav2vec/wav2vec2_classification.py | 1 - 1 file changed, 1 deletion(-) diff --git a/fairseq/models/wav2vec/wav2vec2_classification.py b/fairseq/models/wav2vec/wav2vec2_classification.py index c9bbaab28e..e9f05b1917 100644 --- a/fairseq/models/wav2vec/wav2vec2_classification.py +++ b/fairseq/models/wav2vec/wav2vec2_classification.py @@ -110,7 +110,6 @@ def get_pooling_layer( num_targets: int, encoder_layers: int, ): - assert cfg.pooling == 'mean' if cfg.pooling == "first_token": return FirstToken(cfg, encoder_embed_dim, num_targets) # elif cfg.pooling == "mean":