import tensorflow as tf

            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!")

    ###################
    ## build_model() ##
    ###################

    def build_model(self):
        """
        Build the custom CNN for the CIFAR-10 dataset.
        """

        # The input data holders (cf. shapes after prepa) 
        self.X = tf.compat.v1.placeholder(tf.float32, shape = (None, 
                                                     self.config.data["image_size"], 
                                                     self.config.data["image_size"], 
                                                     self.config.data["num_channels"]), name="X")           # ex. (50000, 32, 32, 3)
        self.y = tf.compat.v1.placeholder(tf.int32, shape = (None, self.config.data["num_categories"]), name="y")     # ex. (50000, 10)  
        self.train = tf.compat.v1.placeholder(tf.bool)

        # The CNN architecture = conv/poo layers + flatten layer + connected layers
        with tf.name_scope("cnn"):

            # a. Create convolution/pooling layers = conv + drop + pool + conv + drop + pool + conv + pool + conv + drop  
            self.conv1 = tf.layers.conv2d(self.X, 
                                          self.config.cifar10_cnn["num_filters"], 
                                          self.config.cifar10_cnn["filter_size"], 
