Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerlin committed Apr 28, 2021
1 parent 9bfdbbe commit ba682e4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions docs/tutorials/5_new_modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ Here we show how to develop new components with an example of TSN.

def forward(self, x): # should return a tuple
pass

def init_weights(self, pretrained=None):
pass
```

2. Import the module in `mmaction/models/backbones/__init__.py`.
Expand Down Expand Up @@ -158,7 +155,7 @@ Here we show how to develop a new head with the example of TSNHead as the follow
1. Create a new file `mmaction/models/heads/tsn_head.py`.

You can write a new classification head inheriting from [BaseHead](/mmaction/models/heads/base.py),
and overwrite `init_weights(self)` and `forward(self, x)` method.
and overwrite `forward(self, x)` method.

```python
from ..registry import HEADS
Expand All @@ -173,9 +170,6 @@ Here we show how to develop a new head with the example of TSNHead as the follow

def forward(self, x):
pass

def init_weights(self):
pass
```

2. Import the module in `mmaction/models/heads/__init__.py`
Expand Down

0 comments on commit ba682e4

Please sign in to comment.