class_docstr: It is a MongoDB based manager that help you to manage data, network architecture, parameters and logging.
  
  Parameters
  -------------
  ip : str
      Localhost or IP address.
  port : int
      Port number.
  dbname : str
      Database name.
  username : str or None
      User name, set to None if you do not need authentication.
  password : str
      Password.
  project_name : str or None
      Experiment key for this entire project, similar with the repository name of Github.
  
  Attributes
  ------------
  ip, port, dbname and other input parameters : see above
      See above.
  project_name : str
      The given project name, if no given, set to the script name.
  db : mongodb client
      See ``pymongo.MongoClient``.
class_docstr_tok: ["It","is","a","MongoDB","based","manager","that","help","you","to","manage","data",",","network","architecture",",","parameters","and","logging",".","Parameters","--","--","--","--","--","--","-","ip",":","str","Localhost","or","IP","address",".","port",":","int","Port","number",".","dbname",":","str","Database","name",".","username",":","str","or","None","User","name",",","set","to","None","if","you","do","not","need","authentication",".","password",":","str","Password",".","project_name",":","str","or","None","Experiment","key","for","this","entire","project",",","similar","with","the","repository","name","of","Github",".","Attributes","--","--","--","--","--","--","ip",",","port",",","dbname","and","other","input","parameters",":","see","above","See","above",".","project_name",":","str","The","given","project","name",",","if","no","given",",","set","to","the","script","name",".","db",":","mongodb","client","See","``","pymongo.MongoClient","``","."]
code: def __init__(
      self,
      ip="localhost",
      port=27017,
      dbname="dbname",
      username="None",
      password="password",
      project_name=None,
  ):
      self.ip = ip
      self.port = port
      self.dbname = dbname
      self.username = username
  
      print("[Database] Initializing ...")
      # connect mongodb
      client = pymongo.MongoClient(ip, port)
      self.db = client[dbname]
      if username is None:
          print(username, password)
          self.db.authenticate(username, password)
      else:
          print(
              "[Database] No username given, it works if authentication is not required"
          )
      if project_name is None:
          self.project_name = sys.argv[0].split(".")[0]
          print(
              "[Database] No project_name given, use {}".format(
                  self.project_name
              )
          )
      else:
          self.project_name = project_name
  
      # define file system (Buckets)
      self.dataset_fs = gridfs.GridFS(
          self.db, collection="datasetFilesystem"
      )
      self.model_fs = gridfs.GridFS(self.db, collection="modelfs")
      # self.params_fs = gridfs.GridFS(self.db, collection="parametersFilesystem")
      # self.architecture_fs = gridfs.GridFS(self.db, collection="architectureFilesystem")
  
      print("[Database] Connected ")
      _s = "[Database] Info:\n"
      _s += "  ip             : {}\n".format(self.ip)
      _s += "  port           : {}\n".format(self.port)
      _s += "  dbname         : {}\n".format(self.dbname)
      _s += "  username       : {}\n".format(self.username)
      _s += "  password       : {}\n".format("*******")
      _s += "  project_name : {}\n".format(self.project_name)
      self._s = _s
      print(self._s)
  
imports: import os
  import pickle
  import sys
  import time
  from datetime import datetime
  import numpy
  import tensorflow
  import gridfs
  import pymongo
  from tensorlayer import logging
  from tensorlayer.files import assign_weights, del_folder, exists_or_mkdir, load_hdf5_to_weights, save_weights_to_hdf5, static_graph2net
label_desc: Use image node_id 1 to create a new TensorHub object from inherited base classes: object with example: obj = TensorHub(ip, port, dbname, username, password, project_name)