(func)
| 193 | |
| 194 | |
| 195 | def run_case(func): |
| 196 | pipe = BasicPipeline(BATCH_SIZE, NUM_WORKERS, DEVICE_ID, SEED, images_dir) |
| 197 | pyfunc_pipe = PythonOperatorPipeline(BATCH_SIZE, NUM_WORKERS, DEVICE_ID, SEED, images_dir, func) |
| 198 | for it in range(ITERS): |
| 199 | (preprocessed_output,) = pipe.run() |
| 200 | (output,) = pyfunc_pipe.run() |
| 201 | for i in range(len(output)): |
| 202 | assert numpy.array_equal(output.at(i), func(preprocessed_output.at(i))) |
| 203 | |
| 204 | |
| 205 | def one_channel_normalize(image): |
no test coverage detected