import tensorflow as tf

    def predict(self, queries):
        image_size = self._train_params['image_size']
        images = utils.dataset.transform_images(queries, image_size=image_size, mode='RGB')
        with self._graph.as_default():
            probs = self._predict_with_model(images, **self._knobs)
        return probs.tolist()

    def dump_parameters(self):
        params = {}

        # Add train params
        params['train_params'] = json.dumps(self._train_params)

        # Add model parameters
        with self._graph.as_default():
            tf_vars = tf.global_variables()
            values = self._sess.run(tf_vars)

            for (tf_var, value) in zip(tf_vars, values):
                params[tf_var.name] = np.asarray(value)

        # Add an ID for diffing
        vars_id = np.random.rand()
        params['vars_id'] = vars_id

        # Memo ID
        TfEnas._loaded_tf_vars_id_memo = vars_id

        return params

