(func, pipe, pyfunc_pipe)
| 368 | |
| 369 | |
| 370 | def multi_per_sample_compare(func, pipe, pyfunc_pipe): |
| 371 | for it in range(ITERS): |
| 372 | preprocessed_output1, preprocessed_output2 = pipe.run() |
| 373 | out1, out2, out3 = pyfunc_pipe.run() |
| 374 | for i in range(BATCH_SIZE): |
| 375 | pro1, pro2, pro3 = func(preprocessed_output1.at(i), preprocessed_output2.at(i)) |
| 376 | assert numpy.array_equal(out1.at(i), pro1) |
| 377 | assert numpy.array_equal(out2.at(i), pro2) |
| 378 | assert numpy.array_equal(out3.at(i), pro3) |
| 379 | |
| 380 | |
| 381 | def multi_batch_compare(func, pipe, pyfunc_pipe): |