mirror of https://github.com/open-mmlab/mmcv.git
[Docs] Fix failed links in docs/zh_cn/faq.md (#1964)
* [Docs] Fix failed links in docs/zh_cn/faq.md * fix linkspull/1747/head^2
parent
b326a219a7
commit
c561264d55
|
@ -8,7 +8,7 @@ Feel free to enrich the list if you find any frequent issues and have ways to he
|
|||
- KeyError: "xxx: 'yyy is not in the zzz registry'"
|
||||
|
||||
The registry mechanism will be triggered only when the file of the module is imported.
|
||||
So you need to import that file somewhere. More details can be found at https://github.com/open-mmlab/mmdetection/issues/5974.
|
||||
So you need to import that file somewhere. More details can be found at [KeyError: "MaskRCNN: 'RefineRoIHead is not in the models registry'"](https://github.com/open-mmlab/mmdetection/issues/5974).
|
||||
|
||||
- "No module named 'mmcv.ops'"; "No module named 'mmcv.\_ext'"
|
||||
|
||||
|
@ -61,11 +61,11 @@ Feel free to enrich the list if you find any frequent issues and have ways to he
|
|||
|
||||
- "error: member "torch::jit::detail::ModulePolicy::all_slots" may not be initialized"
|
||||
|
||||
If your version of PyTorch is 1.5.0 and you are building mmcv-full on Windows, you will probably encounter the error `- torch/csrc/jit/api/module.h(474): error: member "torch::jit::detail::ModulePolicy::all_slots" may not be initialized`. The way to solve the error is to replace all the `static constexpr bool all_slots = false;` with `static bool all_slots = false;` at this file `https://github.com/pytorch/pytorch/blob/v1.5.0/torch/csrc/jit/api/module.h`. More details can be found at https://github.com/pytorch/pytorch/issues/39394.
|
||||
If your version of PyTorch is 1.5.0 and you are building mmcv-full on Windows, you will probably encounter the error `- torch/csrc/jit/api/module.h(474): error: member "torch::jit::detail::ModulePolicy::all_slots" may not be initialized`. The way to solve the error is to replace all the `static constexpr bool all_slots = false;` with `static bool all_slots = false;` at this file `https://github.com/pytorch/pytorch/blob/v1.5.0/torch/csrc/jit/api/module.h`. More details can be found at [member "torch::jit::detail::AttributePolicy::all_slots" may not be initialized](https://github.com/pytorch/pytorch/issues/39394).
|
||||
|
||||
- "error: a member with an in-class initializer must be const"
|
||||
|
||||
If your version of PyTorch is 1.6.0 and you are building mmcv-full on Windows, you will probably encounter the error `"- torch/include\torch/csrc/jit/api/module.h(483): error: a member with an in-class initializer must be const"`. The way to solve the error is to replace all the `CONSTEXPR_EXCEPT_WIN_CUDA ` with `const` at `torch/include\torch/csrc/jit/api/module.h`. More details can be found at https://github.com/open-mmlab/mmcv/issues/575.
|
||||
If your version of PyTorch is 1.6.0 and you are building mmcv-full on Windows, you will probably encounter the error `"- torch/include\torch/csrc/jit/api/module.h(483): error: a member with an in-class initializer must be const"`. The way to solve the error is to replace all the `CONSTEXPR_EXCEPT_WIN_CUDA ` with `const` at `torch/include\torch/csrc/jit/api/module.h`. More details can be found at [Ninja: build stopped: subcommand failed](https://github.com/open-mmlab/mmcv/issues/575).
|
||||
|
||||
- "error: member "torch::jit::ProfileOptionalOp::Kind" may not be initialized"
|
||||
|
||||
|
@ -75,17 +75,19 @@ Feel free to enrich the list if you find any frequent issues and have ways to he
|
|||
- replace `explicit operator type&() { return *(this->value); }` with `explicit operator type&() { return *((type*)this->value); }` at `torch\include\pybind11\cast.h`
|
||||
- replace all the `CONSTEXPR_EXCEPT_WIN_CUDA` with `const` at `torch/include\torch/csrc/jit/api/module.h`
|
||||
|
||||
More details can be found at [Ensure default extra_compile_args](https://github.com/pytorch/pytorch/pull/45956).
|
||||
|
||||
- Compatibility issue between MMCV and MMDetection; "ConvWS is already registered in conv layer"
|
||||
|
||||
Please install the correct version of MMCV for the version of your MMDetection following the [installation instruction](https://mmdetection.readthedocs.io/en/latest/get_started.html#installation). More details can be found at https://github.com/pytorch/pytorch/pull/45956.
|
||||
Please install the correct version of MMCV for the version of your MMDetection following the [installation instruction](https://mmdetection.readthedocs.io/en/latest/get_started.html#installation).
|
||||
|
||||
### Usage
|
||||
|
||||
- "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. More datails at https://github.com/pytorch/pytorch/issues/55582
|
||||
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. More datails at [Expected to have finished reduction in the prior iteration before starting a new one](https://github.com/pytorch/pytorch/issues/55582).
|
||||
2. You can set ` find_unused_parameters = True` in the config to solve the above problems or find those unused parameters manually
|
||||
|
||||
- "RuntimeError: Trying to backward through the graph a second time"
|
||||
|
||||
`GradientCumulativeOptimizerHook` and `OptimizerHook` are both set which causes the `loss.backward()` to be called twice so `RuntimeError` was raised. We can only use one of these. More datails at https://github.com/open-mmlab/mmcv/issues/1379.
|
||||
`GradientCumulativeOptimizerHook` and `OptimizerHook` are both set which causes the `loss.backward()` to be called twice so `RuntimeError` was raised. We can only use one of these. More datails at [Trying to backward through the graph a second time](https://github.com/open-mmlab/mmcv/issues/1379).
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
- KeyError: "xxx: 'yyy is not in the zzz registry'"
|
||||
|
||||
只有模块所在的文件被导入时,注册机制才会被触发,所以您需要在某处导入该文件,更多详情请查看 https://github.com/open-mmlab/mmdetection/issues/5974%E3%80%82
|
||||
只有模块所在的文件被导入时,注册机制才会被触发,所以您需要在某处导入该文件,更多详情请查看 [KeyError: "MaskRCNN: 'RefineRoIHead is not in the models registry'"](https://github.com/open-mmlab/mmdetection/issues/5974)。
|
||||
|
||||
- "No module named 'mmcv.ops'"; "No module named 'mmcv.\_ext'"
|
||||
|
||||
|
@ -59,11 +59,11 @@
|
|||
|
||||
- "error: member "torch::jit::detail::ModulePolicy::all_slots" may not be initialized"
|
||||
|
||||
如果您在 Windows 上编译 mmcv-full 并且 PyTorch 的版本是 1.5.0,您很可能会遇到这个问题 `- torch/csrc/jit/api/module.h(474): error: member "torch::jit::detail::ModulePolicy::all_slots" may not be initialized`。解决这个问题的方法是将 `torch/csrc/jit/api/module.h` 文件中所有 `static constexpr bool all_slots = false;` 替换为 `static bool all_slots = false;`。更多细节可以查看 https://github.com/pytorch/pytorch/issues/39394%E3%80%82
|
||||
如果您在 Windows 上编译 mmcv-full 并且 PyTorch 的版本是 1.5.0,您很可能会遇到这个问题 `- torch/csrc/jit/api/module.h(474): error: member "torch::jit::detail::ModulePolicy::all_slots" may not be initialized`。解决这个问题的方法是将 `torch/csrc/jit/api/module.h` 文件中所有 `static constexpr bool all_slots = false;` 替换为 `static bool all_slots = false;`。更多细节可以查看 [member "torch::jit::detail::AttributePolicy::all_slots" may not be initialized](https://github.com/pytorch/pytorch/issues/39394)。
|
||||
|
||||
- "error: a member with an in-class initializer must be const"
|
||||
|
||||
如果您在 Windows 上编译 mmcv-full 并且 PyTorch 的版本是 1.6.0,您很可能会遇到这个问题 `"- torch/include\torch/csrc/jit/api/module.h(483): error: a member with an in-class initializer must be const"`. 解决这个问题的方法是将 `torch/include\torch/csrc/jit/api/module.h` 文件中的所有 `CONSTEXPR_EXCEPT_WIN_CUDA ` 替换为 `const`。更多细节可以查看 https://github.com/open-mmlab/mmcv/issues/575%E3%80%82
|
||||
如果您在 Windows 上编译 mmcv-full 并且 PyTorch 的版本是 1.6.0,您很可能会遇到这个问题 `"- torch/include\torch/csrc/jit/api/module.h(483): error: a member with an in-class initializer must be const"`. 解决这个问题的方法是将 `torch/include\torch/csrc/jit/api/module.h` 文件中的所有 `CONSTEXPR_EXCEPT_WIN_CUDA ` 替换为 `const`。更多细节可以查看 [Ninja: build stopped: subcommand failed](https://github.com/open-mmlab/mmcv/issues/575)。
|
||||
|
||||
- "error: member "torch::jit::ProfileOptionalOp::Kind" may not be initialized"
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
|||
- 将 `torch\include\pybind11\cast.h` 文件中的 `explicit operator type&() { return *(this->value); }` 替换为 `explicit operator type&() { return *((type*)this->value); }`
|
||||
- 将 `torch/include\torch/csrc/jit/api/module.h` 文件中的 所有 `CONSTEXPR_EXCEPT_WIN_CUDA` 替换为 `const`
|
||||
|
||||
更多细节可以查看 https://github.com/pytorch/pytorch/pull/45956%E3%80%82
|
||||
更多细节可以查看 [Ensure default extra_compile_args](https://github.com/pytorch/pytorch/pull/45956)。
|
||||
|
||||
- MMCV 和 MMDetection 的兼容性问题;"ConvWS is already registered in conv layer"
|
||||
|
||||
|
@ -83,9 +83,9 @@
|
|||
|
||||
- "RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one"
|
||||
|
||||
1. 这个错误是因为有些参数没有参与 loss 的计算,可能是代码中存在多个分支,导致有些分支没有参与 loss 的计算。更多细节见 https://github.com/pytorch/pytorch/issues/55582%E3%80%82
|
||||
1. 这个错误是因为有些参数没有参与 loss 的计算,可能是代码中存在多个分支,导致有些分支没有参与 loss 的计算。更多细节见 [Expected to have finished reduction in the prior iteration before starting a new one](https://github.com/pytorch/pytorch/issues/55582)。
|
||||
2. 你可以设置 DDP 中的 `find_unused_parameters` 为 `True`,或者手动查找哪些参数没有用到。
|
||||
|
||||
- "RuntimeError: Trying to backward through the graph a second time"
|
||||
|
||||
不能同时设置 `GradientCumulativeOptimizerHook` 和 `OptimizerHook`,这会导致 `loss.backward()` 被调用两次,于是程序抛出 `RuntimeError`。我们只需设置其中的一个。更多细节见 https://github.com/open-mmlab/mmcv/issues/1379%E3%80%82
|
||||
不能同时设置 `GradientCumulativeOptimizerHook` 和 `OptimizerHook`,这会导致 `loss.backward()` 被调用两次,于是程序抛出 `RuntimeError`。我们只需设置其中的一个。更多细节见 [Trying to backward through the graph a second time](https://github.com/open-mmlab/mmcv/issues/1379)。
|
||||
|
|
Loading…
Reference in New Issue