def __add_input(self, input_name, filename, config_dict={}):
    import importlib
    try:
        placeholder_dict = {}
        for t in self.all_ops:
            if (t.op.op.type == 'Placeholder'):
                placeholder_dict[t.name] = t.op
        names = os.path.split(os.path.abspath(filename))
        path = names[0]
        module_name = names[1].split('.')[(- 2)]
        print(('* input_name is: %s, filename is: %s' % (input_name, filename)))
        print('* config_dict is:', config_dict)
        print(('* module path is: %s, name is: %s' % (path, module_name)))
        sys.path.append(path)
        temp_module = importlib.import_module(module_name)
        input_obj = temp_module.TensorInput(placeholder_dict, config_dict)
        input_obj.show()
        input_item = self.TensorInputItem(input_name, input_obj)
        self.tensor_input_list.append(input_item)
        self.main_window.update_input_list(self.tensor_input_list)
    except Exception as e:
        print('Add_input error:', e)
def __add_input(self, input_name, filename, config_dict={}):
    import importlib
    try:
        placeholder_dict = {}
        for t in self.all_ops:
            if (t.op.op.type == 'Placeholder'):
                placeholder_dict[t.name] = t.op
        names = os.path.split(os.path.abspath(filename))
        path = names[0]
        module_name = names[1].split('.')[(- 2)]
        print(('* input_name is: %s, filename is: %s' % (input_name, filename)))
        print('* config_dict is:', config_dict)
        print(('* module path is: %s, name is: %s' % (path, module_name)))
        sys.path.append(path)
        temp_module = importlib.import_module(module_name)
        input_obj = temp_module.TensorInput(placeholder_dict, config_dict)
        input_obj.show()
        input_item = self.TensorInputItem(input_name, input_obj)
        self.tensor_input_list.append(input_item)
        self.main_window.update_input_list(self.tensor_input_list)
    except Exception as e:
        print('Add_input error:', e)