def save(self, model_file, global_step=None):
        """ save.

        Save a Tensorflow model

        Arguments:
            model_file: `str`. Saving path of tensorflow model
            global_step: `float`. The training step to append to the
                model file name (optional).

        """
        # Temp workaround for tensorflow 0.7.0 dict proto serialization issue
        try:
            # Try latest api
            l = tf.get_collection_ref("summary_tags")
        except Exception:
            l = tf.get_collection("summary_tags")
        l_stags = list(l)
        del l[:]

        # Temp workaround for tensorflow 0.7.0 relative path issue
        if model_file[0] not in ['/', '~']: model_file = './' + model_file

        self.saver.save(self.session, model_file, global_step=global_step)

        # 0.7 workaround, restore values
        for t in l_stags:
            tf.add_to_collection("summary_tags", t)
dataset/ETHPy150Open tflearn/tflearn/tflearn/helpers/trainer.py/Trainer.save/original