!40213 clear python warning

Merge pull request !40213 from 冯一航/clear_python_warning
This commit is contained in:
i-robot 2022-08-11 02:20:01 +00:00 committed by Gitee
commit fac6cab21b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,7 @@ from __future__ import absolute_import
from __future__ import division
import copy
import functools
import json
import os
import shutil
@ -1229,6 +1230,7 @@ def _save_dataset_to_mindir(model, dataset):
def quant_mode_manage(func):
"""Inherit the quant_mode in old version."""
@functools.wraps(func)
def warpper(network, *inputs, file_format, **kwargs):
if 'quant_mode' not in kwargs:
return network