[refactor] move rbm.torch → compat.torch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 08:36:21 +02:00
co-authored by Claude Sonnet 4.6
parent 3d235b4214
commit b41274c7a6
7 changed files with 90 additions and 83 deletions
+84 -76
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -32,7 +32,7 @@
"from rbm.model import Model\n",
"from rbm.entity import Entity, EntityParams, TrainingParams\n",
"from rbm.matrix import Mat, np, rms_error_accu, sample_gaussian\n",
"from rbm.torch import Optimizer\n",
"from compat.torch import Optimizer\n",
"from image.sub_image import SubImageExtract, SubImageCombine, normalize\n",
"import math\n",
"import random"
+1 -1
View File
@@ -24,7 +24,7 @@
"from rbm.model import Model\n",
"from rbm.entity import Entity, EntityParams, TrainingParams\n",
"from rbm.matrix import Mat, np, rms_error_accu\n",
"from rbm.torch import Optimizer\n",
"from compat.torch import Optimizer\n",
"import math"
]
},
+1 -1
View File
@@ -26,7 +26,7 @@
"from rbm.model import Model\n",
"from rbm.entity import Entity, EntityParams, TrainingParams\n",
"from rbm.matrix import Mat, np, rms_error_accu\n",
"from rbm.torch import Optimizer\n",
"from compat.torch import Optimizer\n",
"from image.sub_image import SubImageExtract\n",
"import math"
],
+1 -1
View File
@@ -21,4 +21,4 @@ readme = "README.md"
[tool.setuptools]
package-dir = {"" = "src"}
packages = ["rbm", "image", "stack", "label"]
packages = ["rbm", "image", "stack", "label", "compat"]
View File
-1
View File
@@ -38,4 +38,3 @@ class Optimizer:
grad = self.entity.grad_compute(dbv, dbh, dwhv)
# Adjust weights
self.entity.state_adjust(grad)