MCPcopy Create free account
hub / github.com/antonioo-c/PiMAE / __init__

Method __init__

Pretrain/tutorial_load.py:43–49  ·  view source on GitHub ↗
(self, encoder_layer, num_layers,
                 norm=None, weight_init_name="xavier_uniform")

Source from the content-addressed store, hash-verified

41class TransformerEncoder(nn.Module):
42
43 def __init__(self, encoder_layer, num_layers,
44 norm=None, weight_init_name="xavier_uniform"):
45 super().__init__()
46 self.layers = get_clones(encoder_layer, num_layers)
47 self.num_layers = num_layers
48 self.norm = norm
49 self._reset_parameters(weight_init_name)
50
51 def _reset_parameters(self, weight_init_name):
52 func = WEIGHT_INIT_DICT[weight_init_name]

Callers 1

__init__Method · 0.45

Calls 2

_reset_parametersMethod · 0.95
get_clonesFunction · 0.70

Tested by

no test coverage detected