提交 cd5e588c 编写于 作者: M michaelowenliu

update manager

上级 8095b6a1
...@@ -31,7 +31,7 @@ class ComponentManager: ...@@ -31,7 +31,7 @@ class ComponentManager:
>>> print(model_manager.components) >>> print(model_manager.components)
output: {'AlexNet': <class '__main__.AlexNet'>, 'ResNet': <class '__main__.ResNet'>} output: {'AlexNet': <class '__main__.AlexNet'>, 'ResNet': <class '__main__.ResNet'>}
Or a easier way, using it as a Python decorator, while just add it above the class declaration. Or an easier way, using it as a Python decorator, while just add it above the class declaration.
>>> model_manager = ComponentManager() >>> model_manager = ComponentManager()
>>> @model_manager.add_component >>> @model_manager.add_component
>>> class AlexNet: ... >>> class AlexNet: ...
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册