class_docstr: Pseudo-Prototypical Proxy loss (PPP-loss).
  This is a contrastive loss using prototypes and representations of the
  samples in the batch to optimize the embedding space.
class_docstr_tok: ["Pseudo-Prototypical","Proxy","loss","(","PPP-loss",")",".","This","is","a","contrastive","loss","using","prototypes","and","representations","of","the","samples","in","the","batch","to","optimize","the","embedding","space","."]
docstr: :param p_mem: dictionary with keys the prototype identifier and
                values the prototype tensors.
  :param T: temperature of the softmax, serving as concentration
            density parameter.
docstr_tok: [":","param","p_mem",":","dictionary","with","keys","the","prototype","identifier","and","values","the","prototype","tensors",".",":","param","T",":","temperature","of","the","softmax",",","serving","as","concentration","density","parameter","."]
code: def __init__(self, p_mem: Dict, T=0.1):
      """
      :param p_mem: dictionary with keys the prototype identifier and
                    values the prototype tensors.
      :param T: temperature of the softmax, serving as concentration
                density parameter.
      """
      self.T = T
      self.p_mem = p_mem
  
imports: from typing import Dict
  import torch
  from torch import Tensor
  from torch.nn.functional import normalize
  from torch.nn.modules import Module
  from avalanche.training.utils import get_last_fc_layer, swap_last_fc_layer
  from avalanche.training.plugins.strategy_plugin import SupervisedPlugin
  from avalanche.training.storage_policy import ClassBalancedBuffer
  from avalanche.benchmarks.utils.data_loader import ReplayDataLoader
label_desc: Use image node_id 1 to create a new PPPloss object from inherited base classes: object with example: obj = PPPloss(p_mem, T)