Skip to content

Commit

Permalink
update docs (#2214)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tau-J authored Apr 13, 2023
1 parent 3103f6f commit c82c88b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
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

0 comments on commit c82c88b

Please sign in to comment.