Feature Extraction
Transformers
PyTorch
Safetensors
Fairseq
French
pantagruel_uni
data2vec2
JEPA
speech
custom_code
flaubert commited on
Commit
906aa7d
·
verified ·
1 Parent(s): 5358f7d

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. modeling_pantagruel_uni.py +1 -1
modeling_pantagruel_uni.py CHANGED
@@ -1623,7 +1623,7 @@ class PantagruelUniModel(PantagruelUniPreTrainedModel):
1623
  mode = "TEXT" if input_ids is not None else "AUDIO"
1624
 
1625
  if padding_mask is None and attention_mask is not None:
1626
- padding_mask = ~attention_mask # attention mask: 1 means to attend to (not masked), 0 means not to attend to (masked). padding mask: 1 means padded (not attend to), 0 means not padded (to attend to)
1627
 
1628
  feature_extractor = self.modality_encoders[mode]
1629
  extractor_out = feature_extractor(
 
1623
  mode = "TEXT" if input_ids is not None else "AUDIO"
1624
 
1625
  if padding_mask is None and attention_mask is not None:
1626
+ padding_mask = ~attention_mask.bool() # attention mask: 1 means to attend to (not masked), 0 means not to attend to (masked). padding mask: 1 means padded (not attend to), 0 means not padded (to attend to)
1627
 
1628
  feature_extractor = self.modality_encoders[mode]
1629
  extractor_out = feature_extractor(