in maddpg/common/tf_util.py [0:0]
def save_state(fname, saver=None):
"""Save all the variables in the current session to the location <fname>"""
os.makedirs(os.path.dirname(fname), exist_ok=True)
if saver is None:
saver = tf.train.Saver()
saver.save(get_session(), fname)
return saver