Esempio n. 1
0
    def __init__(self, name, output_path_name, config=None):
        """TODO: to be defined1.

        :name: used to create the model name and output results
        :output_path_name: to construct the output folder in out directory,
        convention is to name it the same as features method name

        """
        self._name = name
        self._config = cfg.config
        if config is not None:
            pass
        output_path = os.path.join(self._config['OUTPUT_ROOT_DIR'],
                                   output_path_name)
        self._output_path = osutils.create_dir(output_path)
        self._model = None
Esempio n. 2
0
    def __init__(self, name=None, config=None):
        """TODO define here

        :config: a dictionary that can overwrite predefined config fields
        :name: using this name to access experiment folders based on this name
        """
        self.config = general_config.config
        if config is not None:
            raise NotImplementedError
        if name is None: self.name = 'temp'
        else: self.name = name

        self.path = osutils.create_dir(self.config['OUTPUT_ROOT_DIR'] +
                                     '/' + self.name)
        self._net = None
        self._transformer = None
    def __init__(self, name, detector, config=None):
        """TODO: to be defined1.

        :name: TODO
        :detector: detector class, I think I just need the det_cls_img_eval
        attribute of it
        :config: TODO

        """
        self.config = general_config.config
        if config is not None:
            raise NotImplementedError
        if name is None:
            self.name = 'temp'
        else:
            self.name = name

        self._output_path = osutils.create_dir(self.config['OUTPUT_ROOT_DIR'] +
                                               '/' + self.name)
        if len(detector.det_cls_img_eval) == 0:
            detector.prepare()
        self._detector = detector
        self._file_name = os.path.join(self._output_path, detector._imdb_name +
                                       '_y.pkl')