augmenters.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:chordrec 作者: fdlm 项目源码 文件源码
def __init__(self, p, max_shift, bins_per_semitone,
                 target_type='chords_maj_min'):
        """
        Augmenter that shifts by semitones a spectrum with logarithmically
        spaced frequency bins.

        :param p: percentage of data to be shifted
        :param max_shift: maximum number of semitones to shift
        :param bins_per_semitone: number of spectrogram bins per semitone
        :param target_type: specifies target type
        """
        self.p = p
        self.max_shift = max_shift
        self.bins_per_semitone = bins_per_semitone

        if target_type == 'chords_maj_min':
            self.adapt_targets = self._adapt_targets_chords_maj_min
        elif target_type == 'chroma':
            self.adapt_targets = self._adapt_targets_chroma
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号