MCPcopy
hub / github.com/Audio-AGI/AudioSep / init_layer

Function init_layer

models/CLAP/open_clip/pann_model.py:18–24  ·  view source on GitHub ↗

Initialize a Linear or Convolutional layer.

(layer)

Source from the content-addressed store, hash-verified

16
17
18def init_layer(layer):
19 """Initialize a Linear or Convolutional layer."""
20 nn.init.xavier_uniform_(layer.weight)
21
22 if hasattr(layer, "bias"):
23 if layer.bias is not None:
24 layer.bias.data.fill_(0.0)
25
26
27def init_bn(bn):

Callers 6

init_weightMethod · 0.70
init_weightMethod · 0.70
init_weightsMethod · 0.70
init_weightMethod · 0.70
init_weightMethod · 0.70
init_weightMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected