class_docstr: He weight initialization.
  
  Weights are initialized with a standard deviation of
  :math:`\sigma = gain \sqrt{\frac{1}{fan_{in}}}` [1]_.
  
  Parameters
  ----------
  initializer : lasagne.init.Initializer
      Initializer used to sample the weights, must accept `std` in its
      constructor to sample from a distribution with a given standard
      deviation.
  gain : float or 'relu'
      Scaling factor for the weights. Set this to ``1.0`` for linear and
      sigmoid units, to 'relu' or ``sqrt(2)`` for rectified linear units, and
      to ``sqrt(2/(1+alpha**2))`` for leaky rectified linear units with
      leakiness ``alpha``. Other transfer functions may need different
      factors.
  c01b : bool
      For a :class:`lasagne.layers.cuda_convnet.Conv2DCCLayer` constructed
      with ``dimshuffle=False``, `c01b` must be set to ``True`` to compute
      the correct fan-in and fan-out.
  
  References
  ----------
  .. [1] Kaiming He et al. (2015):
         Delving deep into rectifiers: Surpassing human-level performance on
         imagenet classification. arXiv preprint arXiv:1502.01852.
  
  See Also
  ----------
  HeNormal  : Shortcut with Gaussian initializer.
  HeUniform : Shortcut with uniform initializer.
class_docstr_tok: ["He","weight","initialization",".","Weights","are","initialized","with","a","standard","deviation","of",":","math",":","`","\\sigma","=","gain","\\sqrt","{","\\frac","{","1","}","{","fan_","{","in","}","}","}","`","[","1","]","_.","Parameters","--","--","--","--","--","initializer",":","lasagne.init.Initializer","Initializer","used","to","sample","the","weights",",","must","accept","`","std","`","in","its","constructor","to","sample","from","a","distribution","with","a","given","standard","deviation",".","gain",":","float","or","'relu'","Scaling","factor","for","the","weights",".","Set","this","to","``","1.0","``","for","linear","and","sigmoid","units",",","to","'relu","'","or","``","sqrt","(","2",")","``","for","rectified","linear","units",",","and","to","``","sqrt","(","2\/","(","1+alpha","*","*","2",")",")","``","for","leaky","rectified","linear","units","with","leakiness","``","alpha","``",".","Other","transfer","functions","may","need","different","factors",".","c01b",":","bool","For","a",":","class",":","`","lasagne.layers.cuda_convnet.Conv2DCCLayer","`","constructed","with","``","dimshuffle=False","``",",","`","c01b","`","must","be","set","to","``","True","``","to","compute","the","correct","fan-in","and","fan-out",".","References","--","--","--","--","--","..","[","1","]","Kaiming","He","et","al",".","(","2015",")",":","Delving","deep","into","rectifiers",":","Surpassing","human-level","performance","on","imagenet","classification",".","arXiv","preprint","arXiv:1502.01852",".","See","Also","--","--","--","--","--","HeNormal",":","Shortcut","with","Gaussian","initializer",".","HeUniform",":","Shortcut","with","uniform","initializer","."]
code: def sample(self, shape):
      if self.c01b:
          if len(shape) != 4:
              raise RuntimeError(
                  "If c01b is True, only shapes of length 4 are accepted"
              )
  
          fan_in = np.prod(shape[:3])
      else:
          if len(shape) == 2:
              fan_in = shape[0]
          elif len(shape) > 2:
              fan_in = np.prod(shape[1:])
          else:
              raise RuntimeError(
                  "This initializer only works with shapes of length >= 2"
              )
  
      std = self.gain * np.sqrt(1.0 / fan_in)
      return self.initializer(std=std).sample(shape)
  
imports: import numpy
  from .utils import floatX
  from .random import get_rng
label_desc: Use image node_id 2 for calling the He obj's underlying member method code with example usage: obj.sample(shape) and returns: self