You are viewing a plain text version of this content. The canonical link for it is here.
Posted to devnull@infra.apache.org by "anirudhacharya (GitHub)" <gi...@apache.org> on 2018/08/22 23:55:12 UTC

[GitHub] [incubator-mxnet] anirudhacharya commented on pull request #12291: [MXNET-817] Fixes to speech recognition example

why remove passing `Singleton` and `class_` while calling `super`?

Typo in line 42, should be `SingletonInstance`.
line 52 in redundant.
The whole `SingletonInstance` class defined in line 42 is redundant. It is not being used anywhere. I think it can be removed.

In fact in this whole speech recognition example, the code around the use of singletons can be refactored. The `Singleton` class defined in line 21 is used only once as a decorator in `label_util.py` module. 

The `log_util.py` module again defines another class called `SingletonType` which is used to make `LogUtil` class a singleton. There is duplication of code and logic here.

[ Full content available at: https://github.com/apache/incubator-mxnet/pull/12291 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org