class_docstr: Implementation of PureFunction for torch.nn.Module.
  
  Examples
  --------
  >>> import torch
  >>> from deepchem.utils.differentiation_utils import get_pure_function
  >>> class A(torch.nn.Module):
  ...     def __init__(self, a):
  ...         super().__init__()
  ...         self.b = torch.nn.Parameter(torch.tensor(a*a))
  ...     def forward(self, x):
  ...         return self.b * x
  >>> B = A(4.)
  >>> m = get_pure_function(B.forward)
  >>> m.set_objparams([3.])
  >>> m(2)
  6.0
class_docstr_tok: ["Implementation","of","PureFunction","for","torch.nn.Module",".","Examples","--","--","--","--",">",">",">","import","torch",">",">",">","from","deepchem.utils.differentiation_utils","import","get_pure_function",">",">",">","class","A","(","torch.nn.Module",")",":","...","def","__init__","(","self",",","a",")",":","...","super","(",")",".__init__","(",")","...","self.b","=","torch.nn.Parameter","(","torch.tensor","(","a","*","a",")",")","...","def","forward","(","self",",","x",")",":","...","return","self.b","*","x",">",">",">","B","=","A","(","4",".",")",">",">",">","m","=","get_pure_function","(","B.forward",")",">",">",">","m.set_objparams","(","[","3",".","]",")",">",">",">","m","(","2",")","6.0"]
docstr: Set the object parameters.
  
  Parameters
  ----------
  objparams: List
      The object parameters to be set
docstr_tok: ["Set","the","object","parameters",".","Parameters","--","--","--","--","--","objparams",":","List","The","object","parameters","to","be","set"]
code: def _set_all_obj_params(self, objparams: List):
      """Set the object parameters.
  
      Parameters
      ----------
      objparams: List
          The object parameters to be set
  
      """
      for name, param in zip(self.names, objparams):
          del_attr(
              self.obj, name
          )  # delete required in case the param is not a torch.nn.Parameter
          set_attr(self.obj, name, param)
  
imports: import torch
  import inspect
  from typing import Callable, List, Tuple, Union
  from deepchem.utils.attribute_utils import set_attr, del_attr
  from deepchem.utils.differentiation_utils import EditableModule
  from deepchem.utils.misc_utils import Uniquifier
  from contextlib import contextmanager
  from abc import abstractmethod
label_desc: Use image node_id 3 for calling the TorchNNPureFunction obj's underlying member method code with example usage: obj._set_all_obj_params(objparams) without return types