def forward(self, x, target=None):
        """
        Parameters
        ----------
        x : torch.Tensor of shape [batch, channel] or [batch, time, channel]
        target : torch.Tensor of shape [batch, channel]
        """
        if self.bn_pooling is not None:
            x = self.bn_pooling(x)
        if self.output_embedding is not None and self.bn_embedding is not None:
            embed = self.bn_embedding(self.output_embedding(x))
        else:
            embed = x
        if self.output_layer is not None or self.normalize_postnet:
            x_norm = F.normalize(embed, p=2, dim=1)
            w_norm = F.normalize(self.output_projection.weight, p=2, dim=1) # [out_dim, in_dim]
            output = F.linear(x_norm, w_norm)
            if self.training and target is not None and self.output_layer is not None:
                output = self.output_layer(output, target)
        else:
            output = self.output_projection(embed)
        return output, embed

        Parameters
        ----------
        x : torch.Tensor of shape [batch, channel] or [batch, time, channel]
        target : torch.Tensor of shape [batch, channel]
        
speecht5/speecht5/models/modules/speaker_decoder_postnet.py