Closed edouardoyallon closed 7 years ago
Some interesting unit tests are:
Tests of approximate equality:
I totally agree with everything you propose. I transferred the code from Tamaris I had(unit_test.lua..). Well, I begin by the low level(complex, FFT, padding..), I'll try to go in higher level when I'll be sure of the low-level ones! I'd like to do one complicated test per function we coded that does work in Lua, such that if one day one of us decide to go deeply into CUDA, it'll be simple. I guess Laurent might have many cool insights on the way to proceed! Any helps are welcome!
I've done something slightly different from scatnet for the padding: first, I constantly verified that pad > unpad was giving the same, this was not correctly done in both version of scatnet in 2d at least. secondly, I've ensured that the padding will have to be 2*ds and not ds. Thus, in critic sampling, it will mean that for instance 1 1 2 2 3 3 4 4 under a sampling of 2^1 will be padded such that 1 1 1 1 2 2 3 3 4 4 4 4 and the operation downsampling+padding will return 1 2 3 4 instead of 1 1 2 3. I think it worth it.(even only for symetry reasons)
You don't need to pad and unpad between layers.
Padding/unpadding of U has been fixed. There is a slight speed improvement with large tensors. Still working on more units tests.
Hi,
I did a series of unit test, however (it's not upload yet coz it's on tamaris) some of them should be deeper and more complicated to ensure with have the same behaviour as with MATLAB.