Commit 1896c8e3 authored by Gabriel Kirsten's avatar Gabriel Kirsten
Browse files

fix on commit d438c4f0
parent 89e8f049
from .classifier import Classifier
try:
from .weka_classifiers import WekaClassifiers
except Exception as e:
WekaClassifiers = None
print e.message
try:
from .cnn_caffe import CNNCaffe
except Exception as e:
CNNCaffe = None
print e.message
try:
from .cnn_keras import CNNKeras
except Exception as e:
CNNKeras = None
print e.message
__all__ = ["classifier",
"cnn_caffe",
"cnn_keras",
"weka_classifiers"
]
from collections import OrderedDict
from util.config import Config
_classifier_list = OrderedDict( [
["cnn_caffe", Config("Invalid" if CNNCaffe is None else CNNCaffe.__name__,
WekaClassifiers is None and CNNCaffe is not None, bool, meta=CNNCaffe, hidden=CNNCaffe is None)],
["cnn_keras", Config("Invalid" if CNNKeras is None else CNNKeras.__name__,
CNNKeras is not None, bool, meta=CNNKeras, hidden=CNNKeras is None)],
["weka_classifiers", Config("Invalid" if WekaClassifiers is None else WekaClassifiers.__name__,
WekaClassifiers is not None, bool, meta=WekaClassifiers, hidden=WekaClassifiers is None)]
] )
def get_classifier_config():
return _classifier_list
def set_classifier_config(configs):
_classifier_list["cnn_caffe"] = Config.nvl_config(configs["cnn_caffe"], _classifier_list["cnn_caffe"])
_classifier_list["cnn_keras"] = Config.nvl_config(configs["cnn_keras"], _classifier_list["cnn_keras"])
_classifier_list["weka_classifiers"] = Config.nvl_config(configs["weka_classifiers"], _classifier_list["weka_classifiers"])
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment