[refactor] move rbm.image → image.sub_image

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 08:01:51 +02:00
co-authored by Claude Sonnet 4.6
parent 599ba4f6d5
commit b0d370a56b
10 changed files with 527 additions and 513 deletions
+292 -346
View File
File diff suppressed because one or more lines are too long
+228 -160
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -21,4 +21,4 @@ readme = "README.md"
[tool.setuptools] [tool.setuptools]
package-dir = {"" = "src"} package-dir = {"" = "src"}
packages = ["rbm"] packages = ["rbm", "image"]
View File
+1 -1
View File
@@ -72,4 +72,4 @@ def conv2d(image: Mat, kernel: Mat, stride: tuple[int,int]):
result[:, c] += np.convolve(image_padded[:,c], kernel[:,k]) result[:, c] += np.convolve(image_padded[:,c], kernel[:,k])
k += 1 k += 1
return result return result
+1 -1
View File
@@ -1,4 +1,4 @@
from rbm.image import conv2d from image.sub_image import conv2d
from rbm.matrix import np from rbm.matrix import np
+1 -1
View File
@@ -5,7 +5,7 @@ import matplotlib.pyplot as plt
from rbm.model import Model from rbm.model import Model
from rbm.entity import Entity, EntityParams, TrainingParams from rbm.entity import Entity, EntityParams, TrainingParams
from rbm.image import SubImage, normalize from image.sub_image import SubImage, normalize
from rbm.matrix import Mat, np, convert from rbm.matrix import Mat, np, convert
from rbm.status import CheckpointStatus from rbm.status import CheckpointStatus
+1 -1
View File
@@ -3,7 +3,7 @@ import matplotlib.pyplot as plt
from rbm.model import Model from rbm.model import Model
from rbm.entity import Entity, EntityParams, TrainingParams from rbm.entity import Entity, EntityParams, TrainingParams
from rbm.image import normalize from image.sub_image import normalize
from rbm.matrix import Mat, np from rbm.matrix import Mat, np
N = 8 N = 8
+1 -1
View File
@@ -1,7 +1,7 @@
from rbm.matrix import Mat, np from rbm.matrix import Mat, np
from rbm.entity import Entity, EntityParams, TrainingParams from rbm.entity import Entity, EntityParams, TrainingParams
from rbm.model import Model from rbm.model import Model
from rbm.image import normalize from image.sub_image import normalize
WORK_DIR = "../../results" WORK_DIR = "../../results"
USE_OPTIMIZER = True USE_OPTIMIZER = True
+1 -1
View File
@@ -1,4 +1,4 @@
from rbm.image import SubImage from image.sub_image import SubImage
from rbm.matrix import np from rbm.matrix import np