- 機器: NCHC Aitrain container
- Python environment as LAB5
- Download this repository to benchmark your project
$ git clone https://github.com/nctu-arch/NCTU_DLSR_final_project.git
- Preparation: install requirements
$ cd NCTU_DLSR_final_project
$ pip3 install -r requirements.txt
from benchmark import benchmarking
- Benchmarking function usage -
benchmarking(team, task, model, preprocess_fn, *pre_args, **pre_kwargs)
- team:
- task:
- 0: classification
- 1: super resolution
- 2: objection detection
- model: pytorch
- 目前計算 pytorch model weight 數量及大小
- preprocess_fn, *pre_args, **pre_kwargs:
- 前處理 function, 可以轉換 data format
- 參數 可自定義, 無則 None
- 撰寫 Inference code
net = resnet18() # define model
@benchmarking(team=12, task=0, model=net, preprocess_fn=None)
def inference_fn(*args, **kwargs):
dev = kwargs['device']
if dev == 'cpu':
metric = do_cpu_inference()
...
elif dev == 'cuda':
metric = do_gpu_inference()
...
return metric
- CINIC-10
- Baseline
- Accuracy Ranking
- Model size
- CPU inference time
- GPU inference time
- DIV2K
- Baseline
- PSNR Ranking
- Model size
- CPU inference time
- GPU inference time
- Clothes
- Baseline:
- F-score Ranking
- Model size
- CPU inference time
- GPU inference time
- Any source code you used in your project.
- Create a team directory named teamX including 'Classification','Object Detection' and 'Super Resolution' to push each task respectively.
e.g..
.
├── team11
└── team12
├── Classification
├── Object Detection
└── Super Resolution
- As a student, you can apply for a GitHub Student Developer Pack, which offers unlimited private repositories.
- Fork this repository, and then make your forked repo duplicated. (Settings -> Danger Zone)
- Add nctu-arch as collaborator. (Settings -> collaborator)
- After deadline we will pull your source code for open review.
- Please describe the external plugins you used and its usage precisely.
TESTDATADIR="./path/to/cifar10/data" python3 example.py
- default: overide team 12 data
http://140.113.213.76/