From 1e8b332027bf7f9b58bc65c0a98393c3a0c777fd Mon Sep 17 00:00:00 2001 From: Hyunjun Go <ghj7138@ajou.ac.kr> Date: Sun, 26 Jun 2022 14:03:30 +0000 Subject: [PATCH] Update README.md --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 3f41916..993f2c9 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,31 @@ Deep learning에 사용되는 프레임워크인 PyTorch를 통해 #### tutorial code [ipynb 파일 참조](timm_tutorial.ipynb) + +#### timm construct model + +* GPU 사용의 경우 ```.cuda()``` 혹은 ```.to(divice)``` 필요 + +```python +model = timm.create_model( + '모델명', pretrained=True, num_classes=num_classes +) +``` +#### timm 구현된 model list 출력 + +```python +import timm +from pprint import pprint +model_names = timm.list_models(pretrained=True) +pprint(model_names) +``` + +#### timm construct optimizer + +* GPU 사용의 경우 ```.cuda()``` 혹은 ```.to(divice)``` 필요 + +```python +optimizer = timm.optim.create_optimizer_v2(model, '옵티마이저 명', lr=learning_rate) +``` + +default = SGD(stochastic gradient descent) optimizer -- GitLab