MCPcopy Create free account
hub / github.com/M-Nauta/ProtoTree / init_weights_xavier

Function init_weights_xavier

util/init.py:68–70  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

66 return tree, epoch
67
68def init_weights_xavier(m):
69 if type(m) == torch.nn.Conv2d:
70 torch.nn.init.xavier_normal_(m.weight, gain=torch.nn.init.calculate_gain('sigmoid'))
71
72def init_weights_kaiming(m):
73 if type(m) == torch.nn.Conv2d:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected