code: def norm_mse_loss(x0: torch.Tensor, x1: torch.Tensor) -> torch.Tensor:
      """Normalized MSE Loss as implemented in https://github.com/htdt/self-supervised."""
      x0 = F.normalize(x0)
      x1 = F.normalize(x1)
      return torch.sub(
          input=2, other=(x0 * x1).sum(dim=-1).mean(), alpha=2
      )
  
file_path: lightly/lightly/loss/wmse_loss.py
imports: from typing import Callable
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: norm_mse_loss(x0, x1) and returns: torch