MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / reset_parameters

Method reset_parameters

timm/models/layers/lambda_layer.py:102–107  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

100 self.reset_parameters()
101
102 def reset_parameters(self):
103 trunc_normal_(self.qkv.weight, std=self.qkv.weight.shape[1] ** -0.5) # fan-in
104 if self.conv_lambda is not None:
105 trunc_normal_(self.conv_lambda.weight, std=self.dim_qk ** -0.5)
106 if self.pos_emb is not None:
107 trunc_normal_(self.pos_emb, std=.02)
108
109 def forward(self, x):
110 B, C, H, W = x.shape

Callers 1

__init__Method · 0.95

Calls 1

trunc_normal_Function · 0.85

Tested by

no test coverage detected