flaubert commited on
Commit
c047693
·
verified ·
1 Parent(s): aba3bde

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. .DS_Store +0 -0
  2. modeling_pantagruel_uni.py +1 -1
.DS_Store ADDED
Binary file (6.15 kB). View file
 
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(