def new_dirname(dirname=None, ndigits=3):
    if dirname is None:
        ext = ("%%_%ii" % ndigits) % 1
        dirname = "%s_%s" % (random_string(6), ext)

    dirname = dirname.replace('.', '_')
    if os.path.exists(dirname):
        dirname = increment_filename(dirname, ndigits=ndigits, delim='_')
    return dirname
Returns the current weights of the optimizer,
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/fileutils.py/new_dirname--crossover with--dataset/ETHPy150Open fchollet/keras/keras/optimizers.py/Optimizer.get_weights