-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add padding_value
attribute to features
#1020
base: master
Are you sure you want to change the base?
Changes from all commits
7b6bda7
6c8c918
1b88cfa
14b51f6
907447c
56ec757
4953907
de6071e
fd7fd3c
81c7a86
96c5477
33f5bef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -193,6 +193,10 @@ def __init__(self, config: Optional[KaldifeatFbankConfig] = None) -> None: | |||
def feature_dim(self, sampling_rate: int) -> int: | ||||
return self.config.mel_opts.num_bins | ||||
|
||||
@property | ||||
def padding_value(self) -> float: | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @csukuangfj could you check if this looks correct? |
||||
return -1000.0 if self.config.use_log_fbank else EPSILON | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should -1000 be replaced with Line 46 in 14b51f6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, ideally it should, but I was basing this on the default value used in the |
||||
|
||||
@staticmethod | ||||
def mix( | ||||
features_a: np.ndarray, features_b: np.ndarray, energy_scaling_factor_b: float | ||||
|
@@ -259,3 +263,7 @@ def __init__(self, config: Optional[KaldifeatMfccConfig] = None) -> None: | |||
|
||||
def feature_dim(self, sampling_rate: int) -> int: | ||||
return self.config.num_ceps | ||||
|
||||
@property | ||||
def padding_value(self) -> float: | ||||
return -1000.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to choose -1000.0 instead of
LOG_EPSILON
or just0
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the discussion in the main thread.