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

Function init_embedding

models/base.py:24–30  ·  view source on GitHub ↗

Initialize a Linear or Convolutional layer.

(layer)

Source from the content-addressed store, hash-verified

22
23
24def init_embedding(layer):
25 """Initialize a Linear or Convolutional layer. """
26 nn.init.uniform_(layer.weight, -1., 1.)
27
28 if hasattr(layer, 'bias'):
29 if layer.bias is not None:
30 layer.bias.data.fill_(0.)
31
32
33def init_gru(rnn):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected