From 1f2fad65c1b0d99ee9b27ccb53f9b0ea96510027 Mon Sep 17 00:00:00 2001 From: masa Date: Thu, 1 Oct 2020 07:46:20 +0900 Subject: [PATCH] fix lint --- python/tvm/relay/frontend/qnn_torch.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/python/tvm/relay/frontend/qnn_torch.py b/python/tvm/relay/frontend/qnn_torch.py index 05149d7ee513f..d0b090059d58a 100644 --- a/python/tvm/relay/frontend/qnn_torch.py +++ b/python/tvm/relay/frontend/qnn_torch.py @@ -71,7 +71,7 @@ def __init__( self.groups = groups -def get_quant_params(qweight): +def _get_quant_params(qweight): import torch weight_np = qweight.dequantize().numpy() @@ -88,12 +88,12 @@ def get_quant_params(qweight): def make_qnn_param(param_name, qweight, bias): - weight_np, scale, zero_point = get_quant_params(qweight) + weight_np, scale, zero_point = _get_quant_params(qweight) return QNNParam(weight_np, bias, scale, zero_point, param_name) def make_conv_packed_param(param_name, qweight, bias, packed_params): - weight_np, scale, zero_point = get_quant_params(qweight) + weight_np, scale, zero_point = _get_quant_params(qweight) stride = packed_params.stride() padding = packed_params.padding() dilation = packed_params.dilation() @@ -126,7 +126,8 @@ def filter_func(named_module): # and loaded back # This module can be safely ignored continue - elif len(state_dict) == 0 and hasattr(m, param_name): + + if len(state_dict) == 0 and hasattr(m, param_name): # for v1.6 and above packed_params = m._packed_params else: