mwirth7 commited on
Commit
6cc416d
·
verified ·
1 Parent(s): 6ff7503

Update feature_extractor.py

Browse files
Files changed (1) hide show
  1. feature_extractor.py +2 -1
feature_extractor.py CHANGED
@@ -133,11 +133,12 @@ class BirdMAEFeatureExtractor(SequenceFeatureExtractor):
133
  # Pad if too short
134
  elif fbank_features.shape[1] < self.target_length:
135
  difference = self.target_length - fbank_features.shape[1]
 
136
  padding = (0, 0, 0, difference) # (left, right, top, bottom)
137
  fbank_features = F.pad(
138
  fbank_features,
139
  padding,
140
- value=self.padding_value
141
  )
142
 
143
  # Normalize
 
133
  # Pad if too short
134
  elif fbank_features.shape[1] < self.target_length:
135
  difference = self.target_length - fbank_features.shape[1]
136
+ min_value = fbank_features.min()
137
  padding = (0, 0, 0, difference) # (left, right, top, bottom)
138
  fbank_features = F.pad(
139
  fbank_features,
140
  padding,
141
+ value=min_value
142
  )
143
 
144
  # Normalize