We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ae3158 commit 2b2e04bCopy full SHA for 2b2e04b
neuralnetlib/layers.py
@@ -1222,7 +1222,7 @@ def __str__(self) -> str:
1222
return f'BatchNormalization(momentum={self.momentum}, epsilon={self.epsilon})'
1223
1224
def forward_pass(self, input_data: np.ndarray, training: bool = True) -> np.ndarray:
1225
- if self.gamma is None:
+ if self.gamma is None or self.running_mean is None or self.running_var is None:
1226
self.initialize_weights(input_data.shape[1:])
1227
1228
input_data = np.clip(input_data, -10, 10)
0 commit comments