- prepare imagenet100 dataset
cd ..
mkdir datasets
// download imagenet100 dataset from kaggle (see below)
- train resnet18 with imagenet100 dataset
cd base_model
python train.py
// 'best_model.pth' will be generated in checkpoint directory.
- generate sparsity model & export onnx file
cd tmo_sparsity
python sparsity_onnx_export.py
python onnx2trt.py
// a file 'resnet18_fp16_sparsity_bf.engine' will be generated in engine directory.