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: Return a layer (nn.Module Object) given a hierarchical layer name, separated by /.
  Args:
      layer_name (str): the name of the layer.
docstr_tok: ["Return","a","layer","(","nn.Module","Object",")","given","a","hierarchical","layer","name",",","separated","by","\/",".","Args",":","layer_name","(","str",")",":","the","name","of","the","layer","."]
code: def _get_layer(self, layer_name):
      """
      Return a layer (nn.Module Object) given a hierarchical layer name, separated by /.
      Args:
          layer_name (str): the name of the layer.
      """
      layer_ls = layer_name.split("/")
      prev_module = self.model
      for layer in layer_ls:
          prev_module = prev_module._modules[layer]
  
      return prev_module
  
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 2 for calling the GetWeightAndActivation obj's underlying member method code with example usage: obj._get_layer(layer_name) and returns: prev_module