This is MUCH faster implementation of the reshapeList function. My SSD model has output shape [3012, 23], so inner for-loop invokes 3012x2 calls to the splice method that makes the function extremely slow. It takes about 2 seconds (!) on my i3 6100 CPU. Therefore I changed the function to avoid calls to the splice method and now it takes just about 1 millisecond what is quite acceptable.
Thanks for the contribution -- been a bit caught up on other things, but hope to review/merge later this week. Just wanted to chime in before its too long.
This is MUCH faster implementation of the reshapeList function. My SSD model has output shape [3012, 23], so inner for-loop invokes 3012x2 calls to the splice method that makes the function extremely slow. It takes about 2 seconds (!) on my i3 6100 CPU. Therefore I changed the function to avoid calls to the splice method and now it takes just about 1 millisecond what is quite acceptable.