MCPcopy Create free account
hub / github.com/apache/singa / __init__

Method __init__

python/singa/layer.py:807–820  ·  view source on GitHub ↗

Args: momentum (float): Factor used in computing the running mean and variance.

(self, *args, momentum=0.9)

Source from the content-addressed store, hash-verified

805 """
806
807 def __init__(self, *args, momentum=0.9):
808 """
809 Args:
810 momentum (float): Factor used in computing the running mean and
811 variance.
812 """
813 super(BatchNorm2d, self).__init__()
814
815 if len(args) > 0:
816 self.channels = args[0]
817 if len(args) > 1:
818 self.momentum = args[1]
819 self.momentum = momentum
820 assert 0 <= momentum <= 1.0, ("Illegal momentum")
821
822 def initialize(self, x):
823 self.channels = x.shape[1]

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected