def save_model(self, network=None, model_name='<STR_LIT>', **kwargs):
kwargs.update({'<STR_LIT>': model_name})<EOL>self._fill_project_info(kwargs)  <EOL>params = network.get_all_params()<EOL>s = time.time()<EOL>kwargs.update({'<STR_LIT>': network.all_graphs, '<STR_LIT:time>': datetime.utcnow()})<EOL>try:<EOL><INDENT>params_id = self.model_fs.put(self._serialization(params))<EOL>kwargs.update({'<STR_LIT>': params_id, '<STR_LIT:time>': datetime.utcnow()})<EOL>self.db.Model.insert_one(kwargs)<EOL>print("<STR_LIT>".format(round(time.time() - s, <NUM_LIT:2>)))<EOL>return True<EOL><DEDENT>except Exception as e:<EOL><INDENT>exc_type, exc_obj, exc_tb = sys.exc_info()<EOL>fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[<NUM_LIT:1>]<EOL>logging.info("<STR_LIT>".format(exc_type, exc_obj, fname, exc_tb.tb_lineno, e))<EOL>print("<STR_LIT>")<EOL>return False<EOL><DEDENT>
Save model architecture and parameters into database, timestamp will be added automatically.

        Parameters
        ----------
        network : TensorLayer layer
            TensorLayer layer instance.
        model_name : str
            The name/key of model.
        kwargs : other events
            Other events, such as name, accuracy, loss, step number and etc (optinal).

        Examples
        ---------
        Save model architecture and parameters into database.
        >>> db.save_model(net, accuracy=0.8, loss=2.3, name='second_model')

        Load one model with parameters from database (run this in other script)
        >>> net = db.find_top_model(sess=sess, accuracy=0.8, loss=2.3)

        Find and load the latest model.
        >>> net = db.find_top_model(sess=sess, sort=[("time", pymongo.DESCENDING)])
        >>> net = db.find_top_model(sess=sess, sort=[("time", -1)])

        Find and load the oldest model.
        >>> net = db.find_top_model(sess=sess, sort=[("time", pymongo.ASCENDING)])
        >>> net = db.find_top_model(sess=sess, sort=[("time", 1)])

        Get model information
        >>> net._accuracy
        ... 0.8

        Returns
        ---------
        boolean : True for success, False for fail.