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

[Docs] update Config docs #2214

Merged
merged 1 commit into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 0 additions & 9 deletions docs/en/how_to.md

This file was deleted.

11 changes: 10 additions & 1 deletion docs/en/user_guides/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ Class Loss_A(nn.Module):
return x
```

And import the new module in `__init__.py` in the corresponding directory:

```Python
# __init__.py of mmpose/models/losses
from .loss_a.py import Loss_A

__all__ = ['Loss_A']
```

Then you can define the module anywhere you want:

```Python
Expand Down Expand Up @@ -102,7 +111,7 @@ General configuration refers to the necessary configuration non-related to train
Here is the description of General configuration:

```Python
# 通用配置
# General
default_scope = 'mmpose'
default_hooks = dict(
timer=dict(type='IterTimerHook'), # time the data processing and model inference
Expand Down
9 changes: 0 additions & 9 deletions docs/zh_cn/how_to.md

This file was deleted.

9 changes: 9 additions & 0 deletions docs/zh_cn/user_guides/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ Class Loss_A(nn.Module):
return x
```

并在对应目录下的 `__init__.py` 中进行 `import`:

```Python
# __init__.py of mmpose/models/losses
from .loss_a.py import Loss_A

__all__ = ['Loss_A']
```

我们就可以通过如下方式来从配置文件定义并进行实例化:

```Python
Expand Down