def METHOD_NAME(self, x):
    specs = self.mel(x)
    specs = specs.unsqueeze(1)
    x, features = self.net(specs)
    if self.mode == "all":
        embed = torch.cat([x, features], dim=1)
    elif self.mode == "embed_only":
        embed = features
    elif self.mode == "logits":
        embed = x
    else:
        raise RuntimeError(
            f"mode='{self.mode}' is not recognized not in: all, embed_only, logits"
        )
    return embed