benchmark folder was copied from: https://github.com/LukasHedegaard/pytorch-benchmark. Some modifications was added. Code for running inference on onnx and tensorrt were copied from Dat Thanh Tran scripts with some modifications.
- Install the dependencies needed for running a learner.
- Create benchmark_class config and model config files.
- Create learner wrapper class (optional) and benchmark class.
- Change hydra output working directory for descriptive name.
- Implement and run pytorch inference.
- Implement and run onnx inference.
- Implement and run tensorrt inference.
Example:
python main.py benchmark_class=pstbln benchmark_class/model=pstbln_casia mode=tensorrt