- added image module with sub image and normalize

- improved tests
This commit is contained in:
2026-01-10 14:12:29 +01:00
parent b6a511e33c
commit f7e3693f45
3 changed files with 68 additions and 4 deletions
+19
View File
@@ -0,0 +1,19 @@
from rbm.image import SubImage
from rbm.matrix import np
if __name__ == "__main__":
n = 2
c = 3
w = 8
h = 8
img = np.reshape(np.linspace(1, n*c*w*h, num=n*c*w*h, dtype=np.float64), (n, c, w, h))
# print(img)
sub = SubImage(4, 4, 1, 1)
images = sub(img)
print(images)
print("Test: [passed]")