Please sign in to comment.
Feature skip data iteration when caching scoring (#557)
* Some cleanups in test_scoring * indentation level * disable some pylint messages * unused fixtures * Don't iterate over data when using cached scoring Before, net.infer was cached when using a scoring callback wiht use_caching=True. This way, the time to make an inference step was saved. However, there was still an iteration step over the data for each scoring callback. If iteration is slow, this could incur a significant overhead. Now net.forward_iter is cached instead. This way, the iteration over the data is skipped and the iteration overhead should be gone. * Add comment to explain attribute priority Similar to the comment in cache_net_infer * Move common functionality to skorch.utils.to_device ... instead of having it as a method on NeuralNet. Add tests * Remove unnecessary import in test_net
- Loading branch information
Showing with 147 additions and 17 deletions.