MCPcopy Create free account
hub / github.com/Audio-AGI/AudioSep / init_layer

Function init_layer

models/base.py:9–15  ·  view source on GitHub ↗

Initialize a Linear or Convolutional layer.

(layer)

Source from the content-addressed store, hash-verified

7
8
9def init_layer(layer):
10 """Initialize a Linear or Convolutional layer. """
11 nn.init.xavier_uniform_(layer.weight)
12
13 if hasattr(layer, "bias"):
14 if layer.bias is not None:
15 layer.bias.data.fill_(0.0)
16
17
18def init_bn(bn):

Callers 4

init_weightsMethod · 0.90
init_weightsMethod · 0.90
init_weightsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected