- added image module with sub image and normalize
- improved tests
This commit is contained in:
@@ -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]")
|
||||
Reference in New Issue
Block a user