code: def forward(self, embedded):
      if self.learning_mode == "learn_only_map_and_prototypes":
          embedded = embedded.detach()
  
      # decode embeddings into prototype space
      encoded = (
          self.metric_space_decoder(embedded)
          if self.metric_space_decoder is not None
          else embedded
      )
  
      prot = self.prototype_vectors
      radii = self.prototype_radii
  
      if self.learning_mode == "learn_only_prototypes":
          encoded = encoded.detach()
  
      if self.learning_mode == "learn_only_embeddings_and_map":
          prot = prot.detach()
  
          if radii is not None:
              radii = radii.detach()
  
      distance = self.distance(encoded, prot)
  
      if radii is not None:
          distance /= self.min_radius + torch.nn.functional.softplus(
              radii
          )
  
      # if unlabeled distance is set, mask out loss to unlabeled class prototype
      if self.unlabeled_distance:
          distance[..., self.unlabeled_idx] = self.unlabeled_distance
  
      scores = -distance
  
      return scores
  
file_path: flair/flair/nn/decoder.py
imports: import logging
  from typing import List, Optional
  import torch
  import flair
  from flair.data import Dictionary, Sentence
  from flair.embeddings import Embeddings
  from flair.nn.distance import CosineDistance, EuclideanDistance, HyperbolicDistance, LogitCosineDistance, NegativeScaledDotProduct
  from flair.training_utils import store_embeddings
label_desc: Use image node_id 3 for calling the PrototypicalDecoder obj's underlying member method code with example usage: obj.forward(embedded) and returns: scores