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.
docstr: gather the gradients in one vector
docstr_tok: ["gather","the","gradients","in","one","vector"]
code: def get_grad_vector(self, pp, grad_dims):
      """
      gather the gradients in one vector
      """
      grads = torch.zeros(sum(grad_dims), device=self.device)
      grads.fill_(0.0)
      cnt = 0
      for param in pp():
          if param.grad is not None:
              beg = 0 if cnt == 0 else sum(grad_dims[:cnt])
              en = sum(grad_dims[: cnt + 1])
              grads[beg:en].copy_(param.grad.data.view(-1))
          cnt += 1
      return grads
  
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 4 for calling the GSS_greedyPlugin obj's underlying member method code with example usage: obj.get_grad_vector(pp, grad_dims) and returns: grads