docstr: An object that contains a tensor with methods to expand it along
  a single dimension.
  
  :param name: data tensor name as a string
  :param shape: data tensor shape. Will be set to the `init_tensor`
      shape, if provided.
  :param init_function: function used to initialize the data tensor.
      If `init_tensor` is provided, `init_function` will only be used
      on subsequent calls of `reset_like` method.
  :param init_tensor: value to be used when creating the object. If None,
      `init_function` will be used.
  :param device: pytorch like device specification as a string or
      `torch.device`.
docstr_tok: ["An","object","that","contains","a","tensor","with","methods","to","expand","it","along","a","single","dimension",".",":","param","name",":","data","tensor","name","as","a","string",":","param","shape",":","data","tensor","shape",".","Will","be","set","to","the","`","init_tensor","`","shape",",","if","provided",".",":","param","init_function",":","function","used","to","initialize","the","data","tensor",".","If","`","init_tensor","`","is","provided",",","`","init_function","`","will","only","be","used","on","subsequent","calls","of","`","reset_like","`","method",".",":","param","init_tensor",":","value","to","be","used","when","creating","the","object",".","If","None",",","`","init_function","`","will","be","used",".",":","param","device",":","pytorch","like","device","specification","as","a","string","or","`","torch.device","`","."]
code: def __init__(
      self,
      name: str,
      shape: Optional[tuple] = None,
      init_function: Callable[[torch.Size], torch.Tensor] = torch.zeros,
      init_tensor: Union[torch.Tensor, None] = None,
      device: Union[str, torch.device] = "cpu",
  ):
      """
      An object that contains a tensor with methods to expand it along
      a single dimension.
  
      :param name: data tensor name as a string
      :param shape: data tensor shape. Will be set to the `init_tensor`
          shape, if provided.
      :param init_function: function used to initialize the data tensor.
          If `init_tensor` is provided, `init_function` will only be used
          on subsequent calls of `reset_like` method.
      :param init_tensor: value to be used when creating the object. If None,
          `init_function` will be used.
      :param device: pytorch like device specification as a string or
          `torch.device`.
      """
      assert isinstance(name, str)
      assert (init_tensor is not None) or (shape is not None)
      if init_tensor is not None and shape is not None:
          assert init_tensor.shape == shape
  
      self.init_function = init_function
      self.name = name
      if shape is not None:
          self.shape = torch.Size(shape)
      else:
          assert init_tensor is not None
          self.shape = init_tensor.size()
  
      self.device = torch.device(device)
      if init_tensor is not None:
          self._data: torch.Tensor = init_tensor
      else:
          self.reset_like()
  
imports: from collections import defaultdict
  from typing import Callable, Dict, List, NamedTuple, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn import Linear, Module
  from torch.utils.data import DataLoader, Dataset
  from avalanche.benchmarks import OnlineCLExperience
  from avalanche.models.batch_renorm import BatchRenorm2D
label_desc: Use image node_id 1 to create a new ParamData object from inherited base classes: object with example: obj = ParamData(name, shape, init_function, init_tensor, device)