diff --git a/speechbrain/lobes/models/g2p/model.py b/speechbrain/lobes/models/g2p/model.py index f7be0327f1..89cf683aea 100644 --- a/speechbrain/lobes/models/g2p/model.py +++ b/speechbrain/lobes/models/g2p/model.py @@ -193,8 +193,7 @@ def forward(self, emb): emb_enc: torch.Tensor encoded word embeddings """ - if self.norm is not None: - x = self.norm(emb) + x = emb if self.norm is None else self.norm(emb) x = self.lin(x) x = self.activation(x) return x