From 43699a23d90c49064b737e75d330b1a7d5929422 Mon Sep 17 00:00:00 2001 From: Shilong Zhang <61961338+jshilong@users.noreply.github.com> Date: Fri, 10 Dec 2021 13:40:19 +0800 Subject: [PATCH] [Doc]Add doc for detect_anomalous_params (#6697) * add doc for detect_anomalous_params * add min verision requirment * fix version and key * fix version --- docs/faq.md | 3 ++- docs_zh-CN/faq.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index 634c00b1ebc..6ebc7d64106 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -82,7 +82,8 @@ We list some common troubles faced by many users and their corresponding solutio - "RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one" 1. This error indicates that your module has parameters that were not used in producing loss. This phenomenon may be caused by running different branches in your code in DDP mode. - 2. You can set ` find_unused_parameters = True` in the config to solve the above problems or find those unused parameters manually. + 2. You can set ` find_unused_parameters = True` in the config to solve the above problems(but this will slow down the training speed. + 3. If the version of your MMCV >= 1.4.1, you can get the name of those unused parameters with `detect_anomalous_params=True` in `optimizer_config` of config. - Save the best model diff --git a/docs_zh-CN/faq.md b/docs_zh-CN/faq.md index 904fcc9a410..1e5bcd9ee67 100644 --- a/docs_zh-CN/faq.md +++ b/docs_zh-CN/faq.md @@ -84,7 +84,8 @@ - "RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one" 1. 这个错误出现在存在参数没有在 forward 中使用,容易在 DDP 中运行不同分支时发生。 - 2. 你可以在 config 设置 `find_unused_parameters = True`,或者手动查找哪些参数没有用到。 + 2. 你可以在 config 设置 `find_unused_parameters = True` 进行训练 (会降低训练速度)。 + 3. 你也可以通过在 config 中的 `optimizer_config` 里设置 `detect_anomalous_params=True` 查找哪些参数没有用到,但是需要 MMCV 的版本 >= 1.4.1。 - 训练中保存最好模型