Thank you! So I assume if I had a F.normalize(x, p=2, dim=1) in my forward pass I would just replace with:
class normalize(nn.Module):
    def __init__(self):
        super(normalize, self).__init__()
        
    def forward(self, x):
        x = F.normalize(x, p=2, dim=1)
        return x