forked from nudt_dsp/netrans
fix name confuse
This commit is contained in:
parent
87e6c28404
commit
dc12812dc6
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from utils import check_path, AttributeCopier, creat_cla
|
from utils import check_path, AttributeCopier, create_cls
|
||||||
|
|
||||||
class Config(AttributeCopier):
|
class Config(AttributeCopier):
|
||||||
def __init__(self, source_obj) -> None:
|
def __init__(self, source_obj) -> None:
|
||||||
|
@ -29,7 +29,7 @@ def main():
|
||||||
network_name = sys.argv[1]
|
network_name = sys.argv[1]
|
||||||
# 构建 netrans 可执行文件的路径
|
# 构建 netrans 可执行文件的路径
|
||||||
netrans_path =os.getenv('NETRANS_PATH')
|
netrans_path =os.getenv('NETRANS_PATH')
|
||||||
cla = creat_cla(netrans_path, network_name)
|
cla = create_cls(netrans_path, network_name)
|
||||||
func = InputmetaGen(cla)
|
func = InputmetaGen(cla)
|
||||||
func.inputmeta_gen()
|
func.inputmeta_gen()
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
from utils import check_path, AttributeCopier, creat_cla
|
from utils import check_path, AttributeCopier, create_cls
|
||||||
|
|
||||||
def check_status(result):
|
def check_status(result):
|
||||||
if result.returncode == 0:
|
if result.returncode == 0:
|
||||||
|
@ -218,7 +218,7 @@ def main():
|
||||||
|
|
||||||
netrans_path = os.environ['NETRANS_PATH']
|
netrans_path = os.environ['NETRANS_PATH']
|
||||||
# netrans = os.path.join(netrans_path, 'pnnacc')
|
# 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 = ImportModel(clas)
|
||||||
func.import_network()
|
func.import_network()
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
from utils import check_path, AttributeCopier, creat_cla
|
from utils import check_path, AttributeCopier, create_cls
|
||||||
|
|
||||||
class Infer(AttributeCopier):
|
class Infer(AttributeCopier):
|
||||||
def __init__(self, source_obj) -> None:
|
def __init__(self, source_obj) -> None:
|
||||||
|
@ -79,7 +79,7 @@ def main():
|
||||||
netrans_path = os.environ['NETRANS_PATH']
|
netrans_path = os.environ['NETRANS_PATH']
|
||||||
# netrans = os.path.join(netrans_path, 'pnnacc')
|
# netrans = os.path.join(netrans_path, 'pnnacc')
|
||||||
quantize_type = sys.argv[2]
|
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)
|
func = Infer(cla)
|
||||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ruamel.yaml==0.18.6
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from utils import check_path, AttributeCopier, creat_cla
|
from utils import check_path, AttributeCopier, create_cls
|
||||||
|
|
||||||
class Quantize(AttributeCopier):
|
class Quantize(AttributeCopier):
|
||||||
def __init__(self, source_obj) -> None:
|
def __init__(self, source_obj) -> None:
|
||||||
|
@ -83,7 +83,7 @@ def main():
|
||||||
netrans_path = os.environ['NETRANS_PATH']
|
netrans_path = os.environ['NETRANS_PATH']
|
||||||
# netrans = os.path.join(netrans_path, 'pnnacc')
|
# netrans = os.path.join(netrans_path, 'pnnacc')
|
||||||
quantize_type = sys.argv[2]
|
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)
|
run = Quantize(cla)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from utils import check_path, AttributeCopier, creat_cla
|
from utils import check_path, AttributeCopier, create_cls
|
||||||
|
|
||||||
class Quantize(AttributeCopier):
|
class Quantize(AttributeCopier):
|
||||||
def __init__(self, source_obj) -> None:
|
def __init__(self, source_obj) -> None:
|
||||||
|
@ -81,7 +81,7 @@ def main():
|
||||||
netrans_path = os.environ['NETRANS_PATH']
|
netrans_path = os.environ['NETRANS_PATH']
|
||||||
# netrans = os.path.join(netrans_path, 'pnnacc')
|
# netrans = os.path.join(netrans_path, 'pnnacc')
|
||||||
quantize_type = sys.argv[2]
|
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)
|
run = Quantize(cla)
|
||||||
|
|
|
@ -63,7 +63,7 @@ class AttributeCopier:
|
||||||
def _get_attribute_names(source_obj):
|
def _get_attribute_names(source_obj):
|
||||||
return source_obj.__dict__.keys()
|
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:
|
def __init__(self, netrans_path, name, quantized_type = 'uint8',verbose=False) -> None:
|
||||||
self.netrans_path = netrans_path
|
self.netrans_path = netrans_path
|
||||||
self.netrans = os.path.join(self.netrans_path, 'pnnacc')
|
self.netrans = os.path.join(self.netrans_path, 'pnnacc')
|
||||||
|
|
Loading…
Reference in New Issue