Skip to content

Commit

Permalink
fix convlution module norm dim (#2684)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mddct authored Feb 7, 2025
1 parent 0228877 commit ead4d14
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wenet/transformer/convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,15 @@ def __init__(
assert norm in ['batch_norm', 'layer_norm', 'rms_norm']
if norm == "batch_norm":
self.use_layer_norm = False
self.norm = WENET_NORM_CLASSES['batch_norm'](channels,
self.norm = WENET_NORM_CLASSES['batch_norm'](conv_inner_factor *
channels // 2,
eps=norm_eps)
else:
self.use_layer_norm = True
self.norm = WENET_NORM_CLASSES[norm](channels, eps=norm_eps)
self.norm = WENET_NORM_CLASSES[norm](conv_inner_factor *
channels // 2,
eps=norm_eps)


self.pointwise_conv2 = nn.Conv1d(
conv_inner_factor * channels // 2,
Expand Down

0 comments on commit ead4d14

Please sign in to comment.