docstr: Calculates the loss on each embedding $L(e_{ji})$ by taking softmax
docstr_tok: ["Calculates","the","loss","on","each","embedding","$","L","(","e_","{","ji","}",")","$","by","taking","softmax"]
code: def embed_loss_softmax(self, dvecs, cos_sim_matrix):
      """
      Calculates the loss on each embedding $L(e_{ji})$ by taking softmax
      """
      N, M, _ = dvecs.shape
      L = []
      for j in range(N):
          L_row = []
          for i in range(M):
              L_row.append(-F.log_softmax(cos_sim_matrix[j, i], 0)[j])
          L_row = torch.stack(L_row)
          L.append(L_row)
      return torch.stack(L)
  
imports: import torch
  import torch.nn.functional
  from torch import nn
label_desc: Use image node_id 4 for calling the GE2ELoss obj's underlying member method code with example usage: obj.embed_loss_softmax(dvecs, cos_sim_matrix) and returns: torch