open-mmlab/mmengine

[Bug] error in readme

Opened this issue · 0 comments

Prerequisite

Environment

Reproduces the problem - code sample

Reproduces the problem - command or script

https://mmengine.readthedocs.io/zh-cn/latest/advanced_tutorials/config.html#python-beta

Reproduces the problem - error message

# 构建流程完全一致
import torch.nn as nn
from mmengine.registry import OPTIMIZERS


cfg = Config.fromfile('optimizer.py')
model = nn.Conv2d(1, 1, 1)
cfg.optimizer.params = model.parameters()
optimizer = OPTIMIZERS.build(cfg.optimizer)

风格切换时有点小问题

Additional information

No response