Skip to content

Commit 69f98a6

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8c95027 commit 69f98a6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

machine_learning/cnn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def convolve(self, x: np.ndarray, filters: np.ndarray) -> np.ndarray:
4242
for f in range(num_filters):
4343
for i in range(height - fh + 1):
4444
for j in range(width - fw + 1):
45-
region = x[:, i:i + fh, j:j + fw]
45+
region = x[:, i : i + fh, j : j + fw]
4646
output[f, i, j] = np.sum(region * filters[f])
4747
return output
4848

@@ -64,4 +64,4 @@ def forward(self, x: np.ndarray) -> np.ndarray:
6464
activated = self.relu(conv_out)
6565
flattened = self.flatten(activated)
6666
logits = flattened @ self.fc_weights
67-
return logits
67+
return logits

0 commit comments

Comments
 (0)