diff --git a/npu_mnist_example/config.py b/npu_mnist_example/config.py index 3a90c7e..70de3c1 100644 --- a/npu_mnist_example/config.py +++ b/npu_mnist_example/config.py @@ -20,6 +20,9 @@ class Config: def __init__(self, **entries): self.__dict__.update(entries) + def __getitem__(self, item): + return self.__dict__[item] + # 定义配置信息 mnist_cfg = Config( num_classes=10,