class_docstr: Torch module that allows loading variables from the state dict even in the case of shape mismatch.
class_docstr_tok: ["Torch","module","that","allows","loading","variables","from","the","state","dict","even","in","the","case","of","shape","mismatch","."]
docstr: Get attribute of the tensor given the name.
  
  Args:
      attribute_name (str): Name of the tensor
  
  Raises:
      ValueError: `attribute_name` is not a torch Tensor
  
  Returns:
      Tensor: Tensor attribute
docstr_tok: ["Get","attribute","of","the","tensor","given","the","name",".","Args",":","attribute_name","(","str",")",":","Name","of","the","tensor","Raises",":","ValueError",":","`","attribute_name","`","is","not","a","torch","Tensor","Returns",":","Tensor",":","Tensor","attribute"]
code: def get_tensor_attribute(self, attribute_name: str) -> Tensor:
      """Get attribute of the tensor given the name.
  
      Args:
          attribute_name (str): Name of the tensor
  
      Raises:
          ValueError: `attribute_name` is not a torch Tensor
  
      Returns:
          Tensor: Tensor attribute
      """
      attribute = getattr(self, attribute_name)
      if isinstance(attribute, Tensor):
          return attribute
  
      raise ValueError(
          f"Attribute with name '{attribute_name}' is not a torch Tensor"
      )
  
imports: from abc import ABC
  from torch import Tensor, nn
label_desc: Use image node_id 1 for calling the DynamicBufferModule obj's underlying member method code with example usage: obj.get_tensor_attribute(attribute_name) and returns: attribute