import tensorflow as tf

        m = model

        # Do initialization of all variables
        sess.run(tf.global_variables_initializer())

        # Load datasets with defaults
        sess.run([m.train_dataset_init_op, m.pred_dataset_init_op], feed_dict={
            m.ph.train_images: np.zeros((1, w, h, in_ch)),
            m.ph.train_classes: np.zeros((1,)),
            m.ph.pred_images: np.zeros((1, w, h, in_ch)),
            m.ph.pred_classes: np.zeros((1,))
        })

    def _make_session(self):
        config = tf.ConfigProto(allow_soft_placement=True)
        config.gpu_options.allow_growth = True
        sess = tf.Session(config=config)
        return sess

    def _feed_dataset_to_model(self, images, classes=None, is_train=False):
        m = self._model
        utils.logger.log('Feeding dataset to model...')

        # Mock classes if required
        classes = classes or [0 for _ in range(len(images))]

        if is_train:
            self._sess.run(m.train_dataset_init_op, feed_dict={
