mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
[pre-commit.ci] pre-commit autoupdate (#11275)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.14 → v0.2.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.14...v0.2.0) * Upgrade pyproject.toml * Revert sudoku_solver.py RUF017 Avoid quadratic list summation --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
![66853113+pre-commit-ci[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
4128f19170
commit
ed8d9209da
@ -41,11 +41,11 @@ class CNN:
|
||||
self.rate_weight = rate_w
|
||||
self.rate_thre = rate_t
|
||||
self.w_conv1 = [
|
||||
np.mat(-1 * np.random.rand(self.conv1[0], self.conv1[0]) + 0.5)
|
||||
np.asmatrix(-1 * np.random.rand(self.conv1[0], self.conv1[0]) + 0.5)
|
||||
for i in range(self.conv1[1])
|
||||
]
|
||||
self.wkj = np.mat(-1 * np.random.rand(self.num_bp3, self.num_bp2) + 0.5)
|
||||
self.vji = np.mat(-1 * np.random.rand(self.num_bp2, self.num_bp1) + 0.5)
|
||||
self.wkj = np.asmatrix(-1 * np.random.rand(self.num_bp3, self.num_bp2) + 0.5)
|
||||
self.vji = np.asmatrix(-1 * np.random.rand(self.num_bp2, self.num_bp1) + 0.5)
|
||||
self.thre_conv1 = -2 * np.random.rand(self.conv1[1]) + 1
|
||||
self.thre_bp2 = -2 * np.random.rand(self.num_bp2) + 1
|
||||
self.thre_bp3 = -2 * np.random.rand(self.num_bp3) + 1
|
||||
|
Reference in New Issue
Block a user