Skip to content

Commit

Permalink
conformer variant fix
Browse files Browse the repository at this point in the history
  • Loading branch information
priyakasimbeg committed Nov 16, 2023
1 parent 86bf643 commit 88bfde9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ConformerConfig:
use_specaug: bool = True
attention_temperature: float = 1.0
activation_function_name: str = 'swish'
use_post_layer_norm: bool = False
use_post_layer_norm: bool = True


class LayerNorm(nn.Module):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class LibriSpeechConformerLayerNormWorkload(LibriSpeechConformerWorkload):

property
def use_post_layer_norm(self) -> bool:
return True
return False


class LibriSpeechConformerGeluWorkload(LibriSpeechConformerWorkload):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ConformerConfig:
use_specaug: bool = True
attention_temperature: float = 1.0
activation_function_name: str = 'swish'
use_post_layer_norm: bool = False
use_post_layer_norm: bool = True


def initialize(m):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def init_model_fn(
use_post_layer_norm=self.use_post_layer_norm,
activation_function_name=activation_function_name))
self.ctc_loss = torch.nn.CTCLoss(blank=0, reduction='none')
model.initialize(model)
models.initialize(model)
self._param_shapes = param_utils.pytorch_param_shapes(model)
self._param_types = param_utils.pytorch_param_types(self._param_shapes)
model.to(DEVICE)
Expand Down Expand Up @@ -343,7 +343,7 @@ class LibriSpeechConformerLayerNormWorkload(LibriSpeechConformerWorkload):

property
def use_post_layer_norm(self) -> bool:
return True
return False


class LibriSpeechConformerGeluWorkload(LibriSpeechConformerWorkload):
Expand Down

0 comments on commit 88bfde9

Please sign in to comment.