Skip to content

Commit

Permalink
[Docs] add index number for tutorial and merge config.md into it. (#491)
Browse files Browse the repository at this point in the history
* add index

* Update README.md
  • Loading branch information
dreamerlin committed Dec 25, 2020
1 parent 814d97d commit 264c3ad
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ The supported datasets are listed in [supported_datasets.md](docs/supported_data
## Get Started

Please see [getting_started.md](docs/getting_started.md) for the basic usage of MMAction2.
There are also tutorials for [finetuning models](docs/tutorials/finetune.md), [adding new dataset](docs/tutorials/new_dataset.md), [designing data pipeline](docs/tutorials/data_pipeline.md), [exporting model to onnx](docs/tutorials/export_model.md), [customizing runtime settings](docs/tutorials/customize_runtime.md) and [adding new modules](docs/tutorials/new_modules.md).
There are also tutorials for [learn about configs](docs/tutorials/1_config.md), [finetuning models](docs/tutorials/2_finetune.md), [adding new dataset](docs/tutorials/3_new_dataset.md), [designing data pipeline](docs/tutorials/4_data_pipeline.md), [adding new modules](docs/tutorials/5_new_modules.md), [exporting model to onnx](docs/tutorials/6_export_model.md) and [customizing runtime settings](docs/tutorials/7_customize_runtime.md).

A Colab tutorial is also provided. You may preview the notebook [here](demo/mmaction2_tutorial.ipynb) or directly [run](https://colab.research.google.com/github/open-mmlab/mmaction2/blob/master/demo/mmaction2_tutorial.ipynb) on Colab.

Expand Down
4 changes: 2 additions & 2 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If the contents here do not cover your issue, please create an issue using the [

- **How to just use trained recognizer models for backbone pre-training ?**

Refer to [Use Pre-Trained Model](https://github.com/open-mmlab/mmaction2/blob/master/docs/tutorials/finetune.md#use-pre-trained-model),
Refer to [Use Pre-Trained Model](https://github.com/open-mmlab/mmaction2/blob/master/docs/tutorials/2_finetune.md#use-pre-trained-model),
in order to use the pre-trained model for the whole network, the new config adds the link of pre-trained models in the `load_from`.

And to use backbone for pre-training, you can change `pretrained` value in the backbone dict of config files to the checkpoint path / url.
Expand All @@ -47,7 +47,7 @@ If the contents here do not cover your issue, please create an issue using the [
log_config=dict(interval=20, hooks=[dict(type='TensorboardLoggerHook')])
```

You can refer to [tutorials/customize_runtime.md](tutorials/customize_runtime.md#log-config), [config.md](config.md) and [this](https://github.com/open-mmlab/mmaction2/blob/master/configs/recognition/tsm/tsm_r50_1x1x8_50e_kinetics400_rgb.py#L118).
You can refer to [tutorials/1_config.md](tutorials/1_config.md), [tutorials/7_customize_runtime.md](tutorials/7_customize_runtime.md#log-config), and [this](https://github.com/open-mmlab/mmaction2/blob/master/configs/recognition/tsm/tsm_r50_1x1x8_50e_kinetics400_rgb.py#L118).

## Testing

Expand Down
8 changes: 4 additions & 4 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ mmaction2

For more information on data preparation, please see [data_preparation.md](data_preparation.md)

For using custom datasets, please refer to [Tutorial 2: Adding New Dataset](tutorials/new_dataset.md)
For using custom datasets, please refer to [Tutorial 2: Adding New Dataset](tutorials/3_new_dataset.md)

## Inference with Pre-Trained Models

Expand Down Expand Up @@ -417,6 +417,6 @@ CUDA_VISIBLE_DEVICES=4,5,6,7 GPUS=4 ./tools/slurm_train.sh ${PARTITION} ${JOB_NA

## Tutorials

Currently, we provide some tutorials for users to [finetune model](tutorials/finetune.md),
[add new dataset](tutorials/new_dataset.md), [customize data pipelines](tutorials/data_pipeline.md),
[add new modules](tutorials/new_modules.md), [export a model to ONNX](tutorials/export_model.md) and [customize runtime settings](tutorials/customize_runtime.md).
Currently, we provide some tutorials for users to [learn about configs](tutorials/1_config.md), [finetune model](tutorials/2_finetune.md),
[add new dataset](tutorials/3_new_dataset.md), [customize data pipelines](tutorials/4_data_pipeline.md),
[add new modules](tutorials/5_new_modules.md), [export a model to ONNX](tutorials/6_export_model.md) and [customize runtime settings](tutorials/7_customize_runtime.md).
14 changes: 7 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Welcome to MMAction2's documentation!
getting_started.md
demo.md
benchmark.md
config.md

.. toctree::
:maxdepth: 2
Expand All @@ -30,12 +29,13 @@ Welcome to MMAction2's documentation!
:maxdepth: 2
:caption: Tutorials

tutorials/finetune.md
tutorials/new_dataset.md
tutorials/data_pipeline.md
tutorials/new_modules.md
tutorials/export_model.md
tutorials/customize_runtime.md
tutorials/1_config.md
tutorials/2_finetune.md
tutorials/3_new_dataset.md
tutorials/4_data_pipeline.md
tutorials/5_new_modules.md
tutorials/6_export_model.md
tutorials/7_customize_runtime.md

.. toctree::
:maxdepth: 2
Expand Down
1 change: 0 additions & 1 deletion docs/merge_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ sed -i 's=](/=](https://github.com/open-mmlab/mmaction2/tree/master/=g' detectio
sed -i 's=](/=](https://github.com/open-mmlab/mmaction2/tree/master/=g' benchmark.md
sed -i 's=](/=](https://github.com/open-mmlab/mmaction2/tree/master/=g' getting_started.md
sed -i 's=](/=](https://github.com/open-mmlab/mmaction2/tree/master/=g' install.md
sed -i 's=](/=](https://github.com/open-mmlab/mmaction2/tree/master/=g' config.md
sed -i 's=](/=](https://github.com/open-mmlab/mmaction2/tree/master/=g' changelog.md
sed -i 's/](\/docs\//](/g' ./tutorials/*.md
sed -i 's=](/=](https://github.com/open-mmlab/mmaction2/tree/master/=g' ./tutorials/*.md
Expand Down
8 changes: 4 additions & 4 deletions docs/config.md → docs/tutorials/1_config.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Config System
# Tutorial 1: Learn about Configs

We use python files as configs. You can find all the provided configs under `$MMAction2/configs`.

Expand Down Expand Up @@ -149,7 +149,7 @@ which is convenient to conduct various experiments.
optimizer = dict(
# Config used to build optimizer, support (1). All the optimizers in PyTorch
# whose arguments are also the same as those in PyTorch. (2). Custom optimizers
# which are builed on `constructor`, referring to "tutorials/new_modules.md"
# which are builed on `constructor`, referring to "tutorials/5_new_modules.md"
# for implementation.
type='Adam', # Type of optimizer, refer to https://github.com/open-mmlab/mmcv/blob/master/mmcv/runner/optimizer/default_constructor.py#L13 for more details
lr=0.001, # Learning rate, see detail usages of the parameters in the documentaion of PyTorch
Expand Down Expand Up @@ -360,7 +360,7 @@ which is convenient to conduct various experiments.
optimizer = dict(
# Config used to build optimizer, support (1). All the optimizers in PyTorch
# whose arguments are also the same as those in PyTorch. (2). Custom optimizers
# which are builed on `constructor`, referring to "tutorials/new_modules.md"
# which are builed on `constructor`, referring to "tutorials/5_new_modules.md"
# for implementation.
type='SGD', # Type of optimizer, refer to https://github.com/open-mmlab/mmcv/blob/master/mmcv/runner/optimizer/default_constructor.py#L13 for more details
lr=0.01, # Learning rate, see detail usages of the parameters in the documentaion of PyTorch
Expand Down Expand Up @@ -584,7 +584,7 @@ data['test'] = data['val'] # Set test_dataset as val_dataset
optimizer = dict(
# Config used to build optimizer, support (1). All the optimizers in PyTorch
# whose arguments are also the same as those in PyTorch. (2). Custom optimizers
# which are builed on `constructor`, referring to "tutorials/new_modules.md"
# which are builed on `constructor`, referring to "tutorials/5_new_modules.md"
# for implementation.
type='SGD', # Type of optimizer, refer to https://github.com/open-mmlab/mmcv/blob/master/mmcv/runner/optimizer/default_constructor.py#L13 for more details
lr=0.2, # Learning rate, see detail usages of the parameters in the documentaion of PyTorch (for 8gpu)
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/finetune.md → docs/tutorials/2_finetune.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tutorial 1: Finetuning Models
# Tutorial 2: Finetuning Models

This tutorial provides instructions for users to use the pre-trained models
to finetune them on other datasets, so that better performance can be get.
Expand All @@ -17,11 +17,11 @@ to finetune them on other datasets, so that better performance can be get.

There are two steps to finetune a model on a new dataset.

1. Add support for the new dataset. See [Tutorial 2: Adding New Dataset](new_dataset.md).
1. Add support for the new dataset. See [Tutorial 2: Adding New Dataset](3_new_dataset.md).
1. Modify the configs. This will be discussed in this tutorial.

For example, if the user want to finetune models pre-trained on Kinetics-400 Dataset to another dataset, say UCF101,
then four parts in the config (see [here](../config.md)) needs attention.
then four parts in the config (see [here](1_config.md)) needs attention.

## Modify Head

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tutorial 2: Adding New Dataset
# Tutorial 3: Adding New Dataset

In this tutorial, we will introduce some methods about how to customize your own dataset by reorganizing data and mixing dataset for the project.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tutorial 3: Customize Data Pipelines
# Tutorial 4: Customize Data Pipelines

In this tutorial, we will introduce some methods about the design of data pipelines, and how to customize and extend your own data pipelines for the project.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tutorial 4: Adding New Modules
# Tutorial 5: Adding New Modules

In this tutorial, we will introduce some methods about how to customize optimizer, develop new components and new a learning rate scheduler for this project.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tutorial 5: Exporting a model to ONNX
# Tutorial 6: Exporting a model to ONNX

Open Neural Network Exchange [(ONNX)](https://onnx.ai/) is an open ecosystem that empowers AI developers to choose the right tools as their project evolves.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tutorial 6: Customize Runtime Settings
# Tutorial 7: Customize Runtime Settings

In this tutorial, we will introduce some methods about how to customize optimization methods, training schedules, workflow and hooks when running your own settings for the project.

Expand Down

0 comments on commit 264c3ad

Please sign in to comment.