mdz/pytorch/TDNN/1_scripts/configs/tdnn.yml

98 lines
2.7 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 数据集参数
dataset_conf:
# 过滤最短的音频长度
min_duration: 0.5
# 最长的音频长度,大于这个长度会裁剪掉
max_duration: 3
# 是否裁剪静音片段
do_vad: False
# 音频的采样率
sample_rate: 16000
# 是否对音频进行音量归一化
use_dB_normalization: True
# 对音频进行音量归一化的音量分贝值
target_dB: -20
# 训练数据的数据列表路径
train_list: 'dataset/train_list.txt'
# 测试数据的数据列表路径
test_list: 'dataset/test_list.txt'
# 标签列表
label_list_path: 'dataset/label_list.txt'
# 评估的数据要特殊处理
eval_conf:
# 评估的批量大小
batch_size: 64
# 最长的音频长度
max_duration: 10
# 数据加载器参数
dataLoader:
# 训练的批量大小
batch_size: 64
# 读取数据的线程数量
num_workers: 4
# 是否丢弃最后一个样本
drop_last: True
# 数据增强参数
aug_conf:
# 是否使用语速扰动增强
speed_perturb: True
# 是否使用音量增强
volume_perturb: False
# 音量增强概率
volume_aug_prob: 0.2
# 噪声增强的噪声文件夹
noise_dir: 'dataset/noise'
# 噪声增强概率
noise_aug_prob: 0.2
# 是否使用SpecAug
use_spec_aug: True
# Spec增强参数
spec_aug_args:
# 随机频谱掩码大小
freq_mask_width: [ 0, 8 ]
# 随机时间掩码大小
time_mask_width: [ 0, 10 ]
# 数据预处理参数
preprocess_conf:
# 音频预处理方法支持MelSpectrogram、Spectrogram、MFCC、Fbank
feature_method: 'Fbank'
# 设置API参数更参数查看对应API不清楚的可以直接删除该部分直接使用默认值
method_args:
sample_frequency: 16000
num_mel_bins: 80
optimizer_conf:
# 优化方法支持Adam、AdamW、SGD
optimizer: 'Adam'
# 初始学习率的大小
learning_rate: 0.001
weight_decay: !!float 1e-6
# 学习率衰减函数支持WarmupCosineSchedulerLR、CosineAnnealingLR
scheduler: 'WarmupCosineSchedulerLR'
# 学习率衰减函数参数
scheduler_args:
min_lr: !!float 1e-5
max_lr: 0.001
warmup_epoch: 5
model_conf:
# 分类大小如果为null自动通过标签列表获取
num_class: null
# 所使用的池化层支持ASP、SAP、TSP、TAP
# pooling_type: 'ASP'
pooling_type: 'SAP'
train_conf:
# 是否开启自动混合精度
enable_amp: False
# 是否使用Pytorch2.0的编译器
use_compile: False
# CrossEntropyLoss类的weight参数
loss_weight: null
# 训练的轮数
max_epoch: 60
log_interval: 10
# 所使用的模型
use_model: 'TDNN'