class_docstr: Asymmetric metric learning (AML) Criterion used in
  "New Insights on Reducing Abrupt Representation
  Change in Online Continual Learning"
  by Lucas Caccia et. al.
  https://openreview.net/forum?id=N8MaByOzUfb
docstr: Function able to scale by its norm a certain tensor.
  :param x: Tensor to normalize.
  :return: Normalized tensor.
docstr_tok: ["Function","able","to","scale","by","its","norm","a","certain","tensor",".",":","param","x",":","Tensor","to","normalize",".",":","return",":","Normalized","tensor","."]
code: def __scale_by_norm(self, x: torch.Tensor) -> torch.Tensor:
      """
      Function able to scale by its norm a certain tensor.
      :param x: Tensor to normalize.
      :return: Normalized tensor.
      """
      x_norm = torch.norm(x, p=2, dim=1).unsqueeze(1).expand_as(x)
      return x / (x_norm + 1e-05)
  
imports: import copy
  from collections import defaultdict
  from typing import List
  import torch
  import torch.nn.functional
  from avalanche.models import MultiTaskModule, avalanche_forward
label_desc: Use image node_id 4 for calling the AMLCriterion obj's underlying member method code with example usage: obj.__scale_by_norm(x) and returns: unknown