Created by: shippingwang
Refactoring image classification. 分类代码重构
Background Following better coding rules mentioned in models new rules and to solve several issues and bugs
Include:
- Code(Script):
New train.py: Fewer code blocks(600l->200l) and better reading experience. Reader.py: Make batch data by paddle.batch now.
More details:
- Put all decay solvers and learning rate strategy in class: Optimizer
- Add some check functions in advance
- Integrate metircs in Loss, Include GoogLeNetLoss, MixupLoss, DefaultLoss, etc.
- Move print code to robust print function: print_info
- pyreader -> PyReader(iterable=Flase)
- PE -> compiled program
- New save/load methods
- Refine CE code, disable now
- Remove fp_16 and dist_train part, It will rewrite in PaddlePaddle/Fleet
- ngraph part, haven't test
- Add configs
主要改动:
- 重写代码,使train.py更加可读,包括pyreader->Pyreader, PE->compiled with形式,所有衡量指标放在Loss类中,所有学习率方式放在Optimizer类中 等。
- reader使用cv2作为默认处理
-
Documents:
-
move Readme.md to Readme_en.md and set Readme_cn.md(Readme.md) as default.
-
update arguments description.
How to run this new code? Train: bash run.sh train AlexNet
fix #3262 (closed)