Merge branch 'master' of https://gitea.star-rising.cn/xkrs_manan/RODY
This commit is contained in:
commit
74c5733a38
@ -301,9 +301,11 @@ def Export_model_RODY(params_str):
|
||||
params = TrainParams()
|
||||
params.read_from_str(params_str)
|
||||
exp_inputPath = params.get('exp_inputPath').value # 模型路径
|
||||
print('输入模型:', exp_inputPath)
|
||||
exp_device = params.get('device').value
|
||||
modellist = Start_Model_Export(exp_inputPath, exp_device)
|
||||
exp_outputPath = exp_inputPath.replace('pt', 'zip') # 压缩文件
|
||||
print('模型路径:',exp_outputPath)
|
||||
zipf = zipfile.ZipFile(exp_outputPath, 'w')
|
||||
for file in modellist:
|
||||
zipf.write(file, arcname=Path(file).name) # 将torchscript和onnx模型压缩
|
||||
|
Loading…
Reference in New Issue
Block a user