benchmark
c0c09d4d - Adding the model input iterators. (#806)

Commit
3 years ago
Adding the model input iterators. (#806) Summary: This PR adds a new interface, `gen_inputs(self) -> Tuple[Generator, Optional[int]]`. The first element is an iterator of the input data, and the second element is the size of the iterator. If the iterator is infinite, the second value is set to None. Currently, only implement this on `timm` and `torchvision` models. Both of them use randomly generated inputs, therefore the second value is set to None in both cases. Pull Request resolved: https://github.com/pytorch/benchmark/pull/806 Reviewed By: shunting314 Differential Revision: D35155417 Pulled By: xuzhao9 fbshipit-source-id: 5e60223279b09ed4336996f7292741be96070bdd
Author
Parents
Loading