Skip to content

Commit

Permalink
make chapter6 work again
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyuntc committed Mar 31, 2018
1 parent c2c8595 commit 8b1ae83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chapter6-实战指南/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ python -m visdom.server

```
# 在gpu0上训练,并把可视化结果保存在visdom 的classifier env上
python main.py train --data-root=./data/train --use-gpu=True --env=classifier
python main.py train --train-data-root=./data/train --use-gpu=True --env=classifier
```


Expand Down
8 changes: 4 additions & 4 deletions chapter6-实战指南/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class DefaultConfig(object):
test_data_root = './data/test1' # 测试集存放路径
load_model_path = None # 加载预训练的模型的路径,为None代表不加载

batch_size = 128 # batch size
batch_size = 32 # batch size
use_gpu = True # user GPU or not
num_workers = 4 # how many workers for loading data
print_freq = 20 # print info every N batch
Expand All @@ -17,9 +17,9 @@ class DefaultConfig(object):
result_file = 'result.csv'

max_epoch = 10
lr = 0.1 # initial learning rate
lr_decay = 0.95 # when val_loss increase, lr = lr*lr_decay
weight_decay = 1e-4 # 损失函数
lr = 0.001 # initial learning rate
lr_decay = 0.5 # when val_loss increase, lr = lr*lr_decay
weight_decay = 0e-5 # 损失函数



Expand Down

0 comments on commit 8b1ae83

Please sign in to comment.