Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions python/tvm/relay/frontend/qnn_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,12 @@
from .pytorch_utils import is_version_greater_than, getattr_attr_name


class QNNParam:
class QNNParam(object):
"""A placeholder for weight quantization parameters"""

def __init__(self, weight, bias, scale, zero_point):
self.weight = weight

if bias is not None:
self.bias = bias.detach().numpy()
else:
self.bias = None

self.bias = None if bias is None else bias.detach().numpy()
self.scale = _expr.const(scale)
self.zero_point = _expr.const(zero_point, dtype="int32")

Expand Down