Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xungeer29 committed Apr 5, 2019
1 parent fbc22dc commit 72180cb
Show file tree
Hide file tree
Showing 14 changed files with 8,303 additions and 54 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ pytorch==0.4.1
```
python train.py
```
* STEP4: inference
```
python inference.py
```

## Results
* 全部重新训练,所有层相同的lr,acc@top1 = 0.65
* 冻结所有卷积层,只训练FC,acc@top1 = 0.926877
* 冻结ResNet的前三个layer,训练layer4与FC,acc@top1 = 97.8774
8 changes: 5 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
class DefaultConfigs(object):
data_root = '/media/gfx/data1/DATA/lida/UCMerced_LandUse/UCMerced_LandUse/Images' # 数据集的根目录
model = 'ResNet152' # ResNet34 使用的模型
freeze = True # 是否冻结卷基层

seed = 1000 # 固定随机种子
num_workers = 12 # DataLoader 中的多线程数量
num_classes = 21 # 分类类别数
num_epochs = 300
num_epochs = 100
batch_size = 16
lr = 0.001 # 初始lr
lr = 0.01 # 初始lr
width = 256 # 输入图像的宽
height = 256 # 输入图像的高
iter_smooth = 10 # 打印&记录log的频率
iter_smooth = 105 # 打印&记录log的频率

resume = False #
checkpoint = 'ResNet152.pth' # 训练完成的模型名

config = DefaultConfigs()
Loading

0 comments on commit 72180cb

Please sign in to comment.