From 67dc4f2cd34e39be3085f3b8b89011bedcd412a9 Mon Sep 17 00:00:00 2001 From: Shuai Wang Date: Thu, 28 Mar 2024 00:29:09 +0800 Subject: [PATCH] fix lint errors --- examples/voxceleb/v2/conf/gemini_dfresnet_adam.yaml | 4 ++-- wespeaker/models/gemini_dfresnet.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/voxceleb/v2/conf/gemini_dfresnet_adam.yaml b/examples/voxceleb/v2/conf/gemini_dfresnet_adam.yaml index a9e4180b..8948dff9 100644 --- a/examples/voxceleb/v2/conf/gemini_dfresnet_adam.yaml +++ b/examples/voxceleb/v2/conf/gemini_dfresnet_adam.yaml @@ -71,11 +71,11 @@ loss_args: {} optimizer: AdamW optimizer_args: - weight_decay: 0.05 + weight_decay: 0.05 scheduler: ExponentialDecrease scheduler_args: initial_lr: 0.000125 final_lr: 0.000001 warm_up_epoch: 0 - warm_from_zero: False + warm_from_zero: False diff --git a/wespeaker/models/gemini_dfresnet.py b/wespeaker/models/gemini_dfresnet.py index 02af6473..9e46f6b2 100644 --- a/wespeaker/models/gemini_dfresnet.py +++ b/wespeaker/models/gemini_dfresnet.py @@ -50,8 +50,8 @@ def forward(self, x): class Gemini_DF_ResNet(nn.Module): # DF_ResNet with T14c stride strategy of Golden Gemini def __init__(self, - depths=[3, 3, 9, 3], - dims=[32, 64, 128, 256], + depths, + dims, feat_dim=40, embed_dim=128, pooling_func='TSTP', @@ -79,7 +79,7 @@ def __init__(self, dims[i], dims[i + 1], kernel_size=3, stride=(stride_f[i], stride_t[i]), padding=1, bias=False), - nn.BatchNorm2d(dims[i + 1]) + nn.BatchNorm2d(dims[i + 1]) ) self.downsample_layers.append(downsample_layer) @@ -154,7 +154,7 @@ def Gemini_DF_ResNet183(feat_dim, embed_dim, pooling_func='TSTP', two_emb_layer= two_emb_layer=two_emb_layer) -def Gemini_DF_ResNet237(feat_dim, embed_dim, pooling_func='TSTP', two_emb_layer=False): # not used +def Gemini_DF_ResNet237(feat_dim, embed_dim, pooling_func='TSTP', two_emb_layer=False): return Gemini_DF_ResNet(depths=[3, 8, 63, 3], dims=[32, 32, 64, 128, 256], feat_dim=feat_dim,