Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ReadMe #1

Merged
merged 11 commits into from
Aug 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update readme_cn
  • Loading branch information
xinntao committed Aug 29, 2021
commit 914da63885f64b17fe9dfda6ad5208731c1994af
26 changes: 20 additions & 6 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ network_g:

Model 的例子在 [models/example_model.py](models/example_model.py)中。它主要搭建了模型的训练过程。
在这个文件中:
1. 我们从 basicsr 中继承了 `SRModel`。很多模型都有类似的操作,因此可以通过继承 [basicsr/models](https://github.com/xinntao/BasicSR/tree/master/basicsr/models) 中的模型来更方便地实现自己的想法,比如GAN模型,Video模型等
1. 我们从 basicsr 中继承了 `SRModel`。很多模型都有相似的操作,因此可以通过继承 [basicsr/models](https://github.com/xinntao/BasicSR/tree/master/basicsr/models) 中的模型来更方便地实现自己的想法,比如GAN模型,Video模型等
1. 使用了两个 Loss: L1 和 L2 (MSE) loss
1. 其他很多内容,比如 `setup_optimizers`, `validation`, `save`,都是继承于 `SRModel`
1. 其他很多内容,比如 `setup_optimizers`, `validation`, `save`,都是继承于 `SRModel`

**注意**:
1. 需要在 `ExampleModel` 前添加 `@MODEL_REGISTRY.register()`,以便注册好新写的 model。这个操作主要用来防止出现同名的 model,从而带来潜在的 bug
Expand Down Expand Up @@ -203,6 +203,20 @@ train:

基于此,我们的 [train.py](train.py)可以非常简洁。

```python
import os.path as osp

import archs # noqa: F401
import data # noqa: F401
import models # noqa: F401
from basicsr.train import train_pipeline

if __name__ == '__main__':
root_path = osp.abspath(osp.join(__file__, osp.pardir))
train_pipeline(root_path)

```

#### :five: debug mode

至此,我们已经完成了我们这个项目的开发,下面可以通过 `debug` 模式来快捷地看看是否有问题:
Expand All @@ -211,9 +225,9 @@ train:
python train.py -opt options/example_option.yml --debug
```

只要带上 `--debug` 就进入 debug 模式。在 debug 模式中,程序每个iter都会输出,8个iter后就会进行validation,这样可以很方便地知道程序有没有bug啦
只要带上 `--debug` 就进入 debug 模式。在 debug 模式中,程序每个iter都会输出,8个iter后就会进行validation,这样可以很方便地知道程序有没有bug啦~

#### :six: Normal training
#### :six: normal training

经过debug没有问题后,我们就可以正式训练了。

Expand All @@ -232,8 +246,8 @@ python train.py -opt options/example_option.yml --auto_resume

## :e-mail: 联系

If you have any question or want to add your project in the list, please email `[email protected]` or `[email protected]`.

如果你有任何问题,或者想要添加你的项目到列表中,欢迎电邮
`[email protected]` or `[email protected]`.


## 文件修改
Expand Down