class_docstr: GSSPlugin replay plugin.
  
  Code adapted from the repository:
  https://github.com/RaptorMai/online-continual-learning
  Handles an external memory fulled with samples selected
  using the Greedy approach of GSS algorithm.
  `before_forward` callback is used to process the current
  sample and estimate a score.
code: def cosine_similarity(self, x1, x2=None, eps=1e-8):
      x2 = x1 if x2 is None else x2
      w1 = x1.norm(p=2, dim=1, keepdim=True)
  
      w2 = w1 if x2 is x1 else x2.norm(p=2, dim=1, keepdim=True)
      sim = torch.mm(x1, x2.t()) / (w1 * w2.t()).clamp(min=eps)
      return sim
  
file_path: avalanche/avalanche/training/plugins/gss_greedy.py
imports: from typing import TYPE_CHECKING
  import torch
  from avalanche.benchmarks.utils import _make_taskaware_classification_dataset
  from avalanche.benchmarks.utils.data_loader import ReplayDataLoader
  from avalanche.training.plugins.strategy_plugin import SupervisedPlugin
label_desc: Use image node_id 3 for calling the GSS_greedyPlugin obj's underlying member method code with example usage: obj.cosine_similarity(x1, x2, eps) and returns: sim