common connected layer of bp network :param units: numbers of neural units :param activation: activation function :param learning_rate: learning rate for paras :param is_input_layer: whether it is input layer or not
(
self, units, activation=None, learning_rate=None, is_input_layer=False
)
| 32 | """ |
| 33 | |
| 34 | def __init__( |
| 35 | self, units, activation=None, learning_rate=None, is_input_layer=False |
| 36 | ): |
| 37 | """ |
| 38 | common connected layer of bp network |
| 39 | :param units: numbers of neural units |
| 40 | :param activation: activation function |
| 41 | :param learning_rate: learning rate for paras |
| 42 | :param is_input_layer: whether it is input layer or not |
| 43 | """ |
| 44 | self.units = units |
| 45 | self.weight = None |
| 46 | self.bias = None |
| 47 | self.activation = activation |
| 48 | if learning_rate is None: |
| 49 | learning_rate = 0.3 |
| 50 | self.learn_rate = learning_rate |
| 51 | self.is_input_layer = is_input_layer |
| 52 | |
| 53 | def initializer(self, back_units): |
| 54 | rng = np.random.default_rng() |
nothing calls this directly
no outgoing calls
no test coverage detected