MCPcopy
hub / github.com/ddbourgin/numpy-ml / __init__

Method __init__

numpy_ml/neural_nets/layers/layers.py:28–39  ·  view source on GitHub ↗

An abstract base class inherited by all neural network layers

(self, optimizer=None)

Source from the content-addressed store, hash-verified

26
27class LayerBase(ABC):
28 def __init__(self, optimizer=None):
29 """An abstract base class inherited by all neural network layers"""
30 self.X = []
31 self.act_fn = None
32 self.trainable = True
33 self.optimizer = OptimizerInitializer(optimizer)()
34
35 self.gradients = {}
36 self.parameters = {}
37 self.derived_variables = {}
38
39 super().__init__()
40
41 @abstractmethod
42 def _init_params(self, **kwargs):

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45

Tested by

no test coverage detected