MCPcopy Create free account
hub / github.com/LeapLabTHU/DAT / __init__

Method __init__

models/dat.py:26–32  ·  view source on GitHub ↗
(self,
                 dim: int,
                 inplace: bool = False,
                 init_values: float = 1e-5)

Source from the content-addressed store, hash-verified

24class LayerScale(nn.Module):
25
26 def __init__(self,
27 dim: int,
28 inplace: bool = False,
29 init_values: float = 1e-5):
30 super().__init__()
31 self.inplace = inplace
32 self.weight = nn.Parameter(torch.ones(dim) * init_values)
33
34 def forward(self, x):
35 if self.inplace:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected