- Moved src/tests/ → tests/ - Added test_* functions with assertions to script-style test files - Added main() to each so IDEs offer it as a separate run target from pytest - Fixed cupy_test.py: remove spurious x_gpu += x_cpu, fix duplicate xlabel Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
204 B
Python
13 lines
204 B
Python
from image.sub_image import conv2d
|
|
from rbm.matrix import np
|
|
|
|
|
|
if __name__ == "__main__":
|
|
A = np.random.rand(3, 3)
|
|
K = np.random.rand(3, 3)
|
|
|
|
y = conv2d(A, K, (1,1))
|
|
print(y)
|
|
|
|
print("Test: [passed]")
|