()
| 321 | """ |
| 322 | |
| 323 | def _gen_loader(): |
| 324 | for inputs, *_ in loader: |
| 325 | if use_gpu: |
| 326 | if isinstance(inputs, (list,)): |
| 327 | for i in range(len(inputs)): |
| 328 | inputs[i] = inputs[i].cuda(non_blocking=True) |
| 329 | else: |
| 330 | inputs = inputs.cuda(non_blocking=True) |
| 331 | yield inputs |
| 332 | |
| 333 | # Update the bn stats. |
| 334 | update_bn_stats(model, _gen_loader(), num_iters) |
no outgoing calls
no test coverage detected