def __init__(self, config, logger=None):
    super().__init__(config, logger)
    try:
        self.num_epochs = self.config.cifar10_cnn['num_epochs']
        self.learning_rate = self.config.cifar10_cnn['learning_rate']
        self.max_to_keep = self.config.cifar10_cnn['max_to_keep']
        self.checkpoint_dir = self.config.cifar10_cnn['checkpoint_dir']
        self.model_dir = self.config.cifar10_cnn['model_dir']
        os.makedirs(self.checkpoint_dir, exist_ok=True)
        os.makedirs(self.model_dir, exist_ok=True)
    except Exception as e:
        (exc_type, exc_obj, exc_tb) = sys.exc_info()
        fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
        logger.error('error msg = {}, error type = {}, error file = {}, error line = {}'.format(e, exc_type, fname, exc_tb.tb_lineno))
        raise RuntimeError('Error in CIFAR10CNN construction regarding the checkpoints and model directories!')
def __init__(self, config, logger=None):
    super().__init__(config, logger)
    try:
        self.num_epochs = self.config.cifar10_cnn['num_epochs']
        self.learning_rate = self.config.cifar10_cnn['learning_rate']
        self.max_to_keep = self.config.cifar10_cnn['max_to_keep']
        self.checkpoint_dir = self.config.cifar10_cnn['checkpoint_dir']
        self.model_dir = self.config.cifar10_cnn['model_dir']
        os.makedirs(self.checkpoint_dir, exist_ok=True)
        os.makedirs(self.model_dir, exist_ok=True)
    except Exception as e:
        (exc_type, exc_obj, exc_tb) = sys.exc_info()
        fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
        logger.error('error msg = {}, error type = {}, error file = {}, error line = {}'.format(e, exc_type, fname, exc_tb.tb_lineno))
        raise RuntimeError('Error in CIFAR10CNN construction regarding the checkpoints and model directories!')