class_docstr: Implement a EuclideanDistance object.
docstr: Returns the squared euclidean distance between each element in mat_1 and each element in mat_2.
  
  Parameters
  ----------
  mat_1: torch.Tensor
      matrix of shape (n_1, n_features)
  mat_2: torch.Tensor
      matrix of shape (n_2, n_features)
  
  Returns:
  -------
  dist: torch.Tensor
      distance matrix of shape (n_1, n_2)
docstr_tok: ["Returns","the","squared","euclidean","distance","between","each","element","in","mat_1","and","each","element","in","mat_2",".","Parameters","--","--","--","--","--","mat_1",":","torch.Tensor","matrix","of","shape","(","n_1",",","n_features",")","mat_2",":","torch.Tensor","matrix","of","shape","(","n_2",",","n_features",")","Returns",":","--","--","--","-","dist",":","torch.Tensor","distance","matrix","of","shape","(","n_1",",","n_2",")"]
code: def forward(self, mat_1: Tensor, mat_2: Tensor) -> Tensor:
      """Returns the squared euclidean distance between each element in mat_1 and each element in mat_2.
  
      Parameters
      ----------
      mat_1: torch.Tensor
          matrix of shape (n_1, n_features)
      mat_2: torch.Tensor
          matrix of shape (n_2, n_features)
  
      Returns:
      -------
      dist: torch.Tensor
          distance matrix of shape (n_1, n_2)
  
      """
      _dist = [
          torch.sum((mat_1 - mat_2[i]) ** 2, dim=1)
          for i in range(mat_2.size(0))
      ]
      dist = torch.stack(_dist, dim=1)
      return dist
  
file_path: flair/flair/nn/distance/euclidean.py
imports: import torch
  from torch import Tensor, nn
label_desc: Use image node_id 1 for calling the EuclideanDistance obj's underlying member method code with example usage: obj.forward(mat_1, mat_2) and returns: dist