improved optimized networks test

improved the equivalency test between optimized and unoptimized
networks to perform 1000 iterations producing the same output for both
networks (before it was only 5 iterations)