__init__.py 363 字节
Newer Older
J
jiangjiajun 已提交
1
__version__ = "0.7.4"
J
jiangjiajun 已提交
2 3 4 5 6 7 8 9 10

from .core.program import PaddleProgram

program = PaddleProgram()

name_counter = dict()


def gen_name(op_name, var_name):
J
jiangjiajun 已提交
11
    name = "{}_{}".format(op_name, var_name)
J
jiangjiajun 已提交
12 13 14 15
    if name not in name_counter:
        name_counter[name] = 0
    else:
        name_counter[name] += 1
J
jiangjiajun 已提交
16
    name = name + "_" + str(name_counter[name])
J
jiangjiajun 已提交
17
    return name