class_docstr: A class used to get weights and activations from specified layers from a Pytorch model.
class_docstr_tok: ["A","class","used","to","get","weights","and","activations","from","specified","layers","from","a","Pytorch","model","."]
docstr: Register hooks to layers in `self.layers_names`.
docstr_tok: ["Register","hooks","to","layers","in","`","self.layers_names","`","."]
code: def _register_hooks(self):
      """
      Register hooks to layers in `self.layers_names`.
      """
      for layer_name in self.layers_names:
          self._register_single_hook(layer_name)
  
imports: import itertools
  import numpy
  import matplotlib.pyplot
  import torch
  from sklearn.metrics import confusion_matrix
  import slowfast.utils.logging
  from slowfast.datasets.utils import pack_pathway_output, tensor_normalize
label_desc: Use image node_id 4 for calling the GetWeightAndActivation obj's underlying member method code with example usage: obj._register_hooks() without return types