MCPcopy Create free account
hub / github.com/CDTrans/CDTrans / trunc_normal_

Function trunc_normal_

model/backbones/vit_pytorch.py:733–751  ·  view source on GitHub ↗

r"""Fills the input Tensor with values drawn from a truncated normal distribution. The values are effectively drawn from the normal distribution :math:`\mathcal{N}(\text{mean}, \text{std}^2)` with values outside :math:`[a, b]` redrawn until they are within the bounds. The method used

(tensor, mean=0., std=1., a=-2., b=2.)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 6

__init__Method · 0.70
_init_weightsMethod · 0.70
__init__Method · 0.70
_init_weightsMethod · 0.70
__init__Method · 0.70
_init_weightsMethod · 0.70

Calls 1

_no_grad_trunc_normal_Function · 0.70

Tested by

no test coverage detected