class_docstr: A module which is able to infer some of its parameters from the inputs to
  its first forward pass. Lazy wraps any other nn.Module, and arguments can be passed
  that will be used to construct that wrapped Module after the first forward pass.
  If any of these arguments are Infer objects, those arguments will be replaced by
  calling the callback of the Infer object on the forward pass input.
  
  For instance,
  >>> Lazy(nn.Linear, Infer(lambda input: input.size(-1)), 4)
  Lazy()
  
  takes its in_features dimension from the last dimension of the input to its forward
  pass. This can be simplified to
  
  >>> Lazy(nn.Linear, Infer.dimension(-1), 4)
  
  or a partial can be created, for instance
  
  >>> LazyLinear = Lazy.partial(nn.Linear, Infer.dimension(-1))
  >>> LazyLinear(4)
  Lazy()
  
  Finally, these Lazy objects explicitly forbid treating themselves normally;
  they must instead be replaced by calling `init_lazy_modules`
  on your model before training. For instance,
  
  >>> ll = lazy.Linear(4)
  >>> seq = nn.Sequential(ll)
  >>> seq
  Sequential(
      0: Lazy(),
  )
  >>> init_lazy_modules(seq, torch.rand(1, 2)
  Sequential(
      0: Linear(in_features=2, out_features=4, bias=True)
  )
class_docstr_tok: ["A","module","which","is","able","to","infer","some","of","its","parameters","from","the","inputs","to","its","first","forward","pass",".","Lazy","wraps","any","other","nn.Module",",","and","arguments","can","be","passed","that","will","be","used","to","construct","that","wrapped","Module","after","the","first","forward","pass",".","If","any","of","these","arguments","are","Infer","objects",",","those","arguments","will","be","replaced","by","calling","the","callback","of","the","Infer","object","on","the","forward","pass","input",".","For","instance",",",">",">",">","Lazy","(","nn.Linear",",","Infer","(","lambda","input",":","input.size","(","-1",")",")",",","4",")","Lazy","(",")","takes","its","in_features","dimension","from","the","last","dimension","of","the","input","to","its","forward","pass",".","This","can","be","simplified","to",">",">",">","Lazy","(","nn.Linear",",","Infer.dimension","(","-1",")",",","4",")","or","a","partial","can","be","created",",","for","instance",">",">",">","LazyLinear","=","Lazy.partial","(","nn.Linear",",","Infer.dimension","(","-1",")",")",">",">",">","LazyLinear","(","4",")","Lazy","(",")","Finally",",","these","Lazy","objects","explicitly","forbid","treating","themselves","normally",";","they","must","instead","be","replaced","by","calling","`","init_lazy_modules","`","on","your","model","before","training",".","For","instance",",",">",">",">","ll","=","lazy.Linear","(","4",")",">",">",">","seq","=","nn.Sequential","(","ll",")",">",">",">","seq","Sequential","(","0",":","Lazy","(",")",",",")",">",">",">","init_lazy_modules","(","seq",",","torch.rand","(","1",",","2",")","Sequential","(","0",":","Linear","(","in_features=2",",","out_features=4",",","bias=True",")",")"]
code: def __setattr__(self, name, value):
      return object.__setattr__(self, name, value)
  
imports: import functools
  from typing import Tuple
  import torch
  from torch import nn
label_desc: Use image node_id 5 for calling the Lazy obj's underlying member method code with example usage: obj.__setattr__(name, value) and returns: object