From 5956c28134c73f338e779a9035e4d47b9ce306f7 Mon Sep 17 00:00:00 2001 From: liuzx Date: Thu, 27 Jun 2024 10:38:36 +0800 Subject: [PATCH] update config.py --- npu_mnist_example/config.py | 3 +++ 1 file changed, 3 insertions(+) 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,