MCPcopy Create free account
hub / github.com/BIT-MCS/DRL-eFresh / init

Function init

methods/model.py:12–18  ·  view source on GitHub ↗
(module, weight_init, bias_init, gain=1)

Source from the content-addressed store, hash-verified

10
11
12def init(module, weight_init, bias_init, gain=1):
13 weight_init(module.weight.data, gain=gain)
14 if module.bias is not None:
15 bias_init(module.bias.data)
16 else:
17 print('None bias')
18 return module
19
20
21class Flatten(nn.Module):

Callers 2

__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected