class_docstr: A class that provides a way to access the submodules and parameters/buffers of a module.
  
  It provides caching mechanism to speed up submodule lookups.
  This is useful for functional programming to manipulate the module state.
class_docstr_tok: ["A","class","that","provides","a","way","to","access","the","submodules","and","parameters\/buffers","of","a","module",".","It","provides","caching","mechanism","to","speed","up","submodule","lookups",".","This","is","useful","for","functional","programming","to","manipulate","the","module","state","."]
docstr: Set the attribute specified by the given path to value.
  
  For example, to set the attribute mod.layer1.conv1.weight,
  use accessor.set_tensor("layer1.conv1.weight", value)
docstr_tok: ["Set","the","attribute","specified","by","the","given","path","to","value",".","For","example",",","to","set","the","attribute","mod.layer1.conv1.weight",",","use","accessor.set_tensor","(","``","layer1.conv1.weight","''",",","value",")"]
code: def set_tensor(self, name: str, value: torch.Tensor) -> None:
      """
      Set the attribute specified by the given path to value.
  
      For example, to set the attribute mod.layer1.conv1.weight,
      use accessor.set_tensor("layer1.conv1.weight", value)
      """
      prefix, _, attr = name.rpartition(".")
      set_tensor(self.get_submodule(prefix), attr, value)
  
imports: from typing import Dict, Iterable, List, Tuple
  import torch
label_desc: Use image node_id 5 for calling the NamedMemberAccessor obj's underlying member method code with example usage: obj.set_tensor(name, value) without return types