diff --git a/netrans_py/__pycache__/config.cpython-312.pyc b/netrans_py/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000..516b1be Binary files /dev/null and b/netrans_py/__pycache__/config.cpython-312.pyc differ diff --git a/netrans_py/__pycache__/config.cpython-38.pyc b/netrans_py/__pycache__/config.cpython-38.pyc new file mode 100644 index 0000000..fac5d37 Binary files /dev/null and b/netrans_py/__pycache__/config.cpython-38.pyc differ diff --git a/netrans_py/__pycache__/export.cpython-312.pyc b/netrans_py/__pycache__/export.cpython-312.pyc new file mode 100644 index 0000000..7e47a05 Binary files /dev/null and b/netrans_py/__pycache__/export.cpython-312.pyc differ diff --git a/netrans_py/__pycache__/export.cpython-38.pyc b/netrans_py/__pycache__/export.cpython-38.pyc new file mode 100644 index 0000000..f70b24d Binary files /dev/null and b/netrans_py/__pycache__/export.cpython-38.pyc differ diff --git a/netrans_py/__pycache__/file_model.cpython-312.pyc b/netrans_py/__pycache__/file_model.cpython-312.pyc new file mode 100644 index 0000000..802aaa2 Binary files /dev/null and b/netrans_py/__pycache__/file_model.cpython-312.pyc differ diff --git a/netrans_py/__pycache__/file_model.cpython-38.pyc b/netrans_py/__pycache__/file_model.cpython-38.pyc new file mode 100644 index 0000000..f9453b0 Binary files /dev/null and b/netrans_py/__pycache__/file_model.cpython-38.pyc differ diff --git a/netrans_py/__pycache__/gen_inputmeta.cpython-312.pyc b/netrans_py/__pycache__/gen_inputmeta.cpython-312.pyc new file mode 100644 index 0000000..e6f381b Binary files /dev/null and b/netrans_py/__pycache__/gen_inputmeta.cpython-312.pyc differ diff --git a/netrans_py/__pycache__/import_model.cpython-312.pyc b/netrans_py/__pycache__/import_model.cpython-312.pyc new file mode 100644 index 0000000..a29bed1 Binary files /dev/null and b/netrans_py/__pycache__/import_model.cpython-312.pyc differ diff --git a/netrans_py/__pycache__/import_model.cpython-38.pyc b/netrans_py/__pycache__/import_model.cpython-38.pyc new file mode 100644 index 0000000..13d040c Binary files /dev/null and b/netrans_py/__pycache__/import_model.cpython-38.pyc differ diff --git a/netrans_py/__pycache__/netrans.cpython-312.pyc b/netrans_py/__pycache__/netrans.cpython-312.pyc new file mode 100644 index 0000000..f42b089 Binary files /dev/null and b/netrans_py/__pycache__/netrans.cpython-312.pyc differ diff --git a/netrans_py/__pycache__/netrans.cpython-38.pyc b/netrans_py/__pycache__/netrans.cpython-38.pyc new file mode 100644 index 0000000..98eff19 Binary files /dev/null and b/netrans_py/__pycache__/netrans.cpython-38.pyc differ diff --git a/netrans_py/__pycache__/quantize.cpython-312.pyc b/netrans_py/__pycache__/quantize.cpython-312.pyc new file mode 100644 index 0000000..ad7069c Binary files /dev/null and b/netrans_py/__pycache__/quantize.cpython-312.pyc differ diff --git a/netrans_py/__pycache__/quantize.cpython-38.pyc b/netrans_py/__pycache__/quantize.cpython-38.pyc new file mode 100644 index 0000000..c69efcf Binary files /dev/null and b/netrans_py/__pycache__/quantize.cpython-38.pyc differ diff --git a/netrans_py/__pycache__/utils.cpython-312.pyc b/netrans_py/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000..a3fc558 Binary files /dev/null and b/netrans_py/__pycache__/utils.cpython-312.pyc differ diff --git a/netrans_py/__pycache__/utils.cpython-38.pyc b/netrans_py/__pycache__/utils.cpython-38.pyc new file mode 100644 index 0000000..c8e2b5e Binary files /dev/null and b/netrans_py/__pycache__/utils.cpython-38.pyc differ diff --git a/netrans_py/config.py b/netrans_py/config.py index 2ab9c52..496fb5c 100644 --- a/netrans_py/config.py +++ b/netrans_py/config.py @@ -1,7 +1,7 @@ import os import sys -from utils import check_path, AttributeCopier, creat_cla +from utils import check_path, AttributeCopier, create_cls class Config(AttributeCopier): def __init__(self, source_obj) -> None: @@ -29,7 +29,7 @@ def main(): network_name = sys.argv[1] # 构建 netrans 可执行文件的路径 netrans_path =os.getenv('NETRANS_PATH') - cla = creat_cla(netrans_path, network_name) + cla = create_cls(netrans_path, network_name) func = InputmetaGen(cla) func.inputmeta_gen() diff --git a/netrans_py/import_model.py b/netrans_py/import_model.py index 340cf57..433a01d 100644 --- a/netrans_py/import_model.py +++ b/netrans_py/import_model.py @@ -1,7 +1,7 @@ import os import sys import subprocess -from utils import check_path, AttributeCopier, creat_cla +from utils import check_path, AttributeCopier, create_cls def check_status(result): if result.returncode == 0: @@ -218,7 +218,7 @@ def main(): netrans_path = os.environ['NETRANS_PATH'] # netrans = os.path.join(netrans_path, 'pnnacc') - clas = creat_cla(netrans_path, network_name,verbose=False) + clas = create_cls(netrans_path, network_name,verbose=False) func = ImportModel(clas) func.import_network() if __name__ == "__main__": diff --git a/netrans_py/infer.py b/netrans_py/infer.py index d0435e2..d3f40dc 100644 --- a/netrans_py/infer.py +++ b/netrans_py/infer.py @@ -1,7 +1,7 @@ import os import sys import subprocess -from utils import check_path, AttributeCopier, creat_cla +from utils import check_path, AttributeCopier, create_cls class Infer(AttributeCopier): def __init__(self, source_obj) -> None: @@ -79,7 +79,7 @@ def main(): netrans_path = os.environ['NETRANS_PATH'] # netrans = os.path.join(netrans_path, 'pnnacc') quantize_type = sys.argv[2] - cla = creat_cla(netrans_path, network_name,quantize_type,False) + cla = create_cls(netrans_path, network_name,quantize_type,False) # 调用量化函数 func = Infer(cla) diff --git a/netrans_py/netrans.egg-info/PKG-INFO b/netrans_py/netrans.egg-info/PKG-INFO new file mode 100644 index 0000000..7cf5242 --- /dev/null +++ b/netrans_py/netrans.egg-info/PKG-INFO @@ -0,0 +1,6 @@ +Metadata-Version: 2.1 +Name: netrans +Version: 0.1.0 +Home-page: https://gitlink.org.cn/gwg_xujiao/netrans +Author: nudt_dsp +Requires-Dist: ruamel.yaml==0.18.6 diff --git a/netrans_py/netrans.egg-info/SOURCES.txt b/netrans_py/netrans.egg-info/SOURCES.txt new file mode 100644 index 0000000..6bb0446 --- /dev/null +++ b/netrans_py/netrans.egg-info/SOURCES.txt @@ -0,0 +1,7 @@ +README.md +setup.py +netrans.egg-info/PKG-INFO +netrans.egg-info/SOURCES.txt +netrans.egg-info/dependency_links.txt +netrans.egg-info/requires.txt +netrans.egg-info/top_level.txt \ No newline at end of file diff --git a/netrans_py/netrans.egg-info/dependency_links.txt b/netrans_py/netrans.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/netrans_py/netrans.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/netrans_py/netrans.egg-info/requires.txt b/netrans_py/netrans.egg-info/requires.txt new file mode 100644 index 0000000..4bfffaa --- /dev/null +++ b/netrans_py/netrans.egg-info/requires.txt @@ -0,0 +1 @@ +ruamel.yaml==0.18.6 diff --git a/netrans_py/netrans.egg-info/top_level.txt b/netrans_py/netrans.egg-info/top_level.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/netrans_py/netrans.egg-info/top_level.txt @@ -0,0 +1 @@ + diff --git a/netrans_py/quantize.py b/netrans_py/quantize.py index b634d0a..0e5e1b8 100644 --- a/netrans_py/quantize.py +++ b/netrans_py/quantize.py @@ -1,6 +1,6 @@ import os import sys -from utils import check_path, AttributeCopier, creat_cla +from utils import check_path, AttributeCopier, create_cls class Quantize(AttributeCopier): def __init__(self, source_obj) -> None: @@ -83,7 +83,7 @@ def main(): netrans_path = os.environ['NETRANS_PATH'] # netrans = os.path.join(netrans_path, 'pnnacc') quantize_type = sys.argv[2] - cla = creat_cla(netrans_path, network_name,quantize_type) + cla = create_cls(netrans_path, network_name,quantize_type) # 调用量化函数 run = Quantize(cla) diff --git a/netrans_py/quantize_hb.py b/netrans_py/quantize_hb.py index 78eef56..845221e 100644 --- a/netrans_py/quantize_hb.py +++ b/netrans_py/quantize_hb.py @@ -1,6 +1,6 @@ import os import sys -from utils import check_path, AttributeCopier, creat_cla +from utils import check_path, AttributeCopier, create_cls class Quantize(AttributeCopier): def __init__(self, source_obj) -> None: @@ -81,7 +81,7 @@ def main(): netrans_path = os.environ['NETRANS_PATH'] # netrans = os.path.join(netrans_path, 'pnnacc') quantize_type = sys.argv[2] - cla = creat_cla(netrans_path, network_name,quantize_type) + cla = create_cls(netrans_path, network_name,quantize_type) # 调用量化函数 run = Quantize(cla) diff --git a/netrans_py/utils.py b/netrans_py/utils.py index cb29427..dadf72a 100644 --- a/netrans_py/utils.py +++ b/netrans_py/utils.py @@ -63,7 +63,7 @@ class AttributeCopier: def _get_attribute_names(source_obj): return source_obj.__dict__.keys() -class creat_cla(): #dataclass @netrans_params +class create_cls(): #dataclass @netrans_params def __init__(self, netrans_path, name, quantized_type = 'uint8',verbose=False) -> None: self.netrans_path = netrans_path self.netrans = os.path.join(self.netrans_path, 'pnnacc')