Skip to content

Avoid using the onnx.mapping module #2226

Open
@justinchuby

Description

@justinchuby

Usage in

packed_weight_np_data = np.asarray(
weight.quantized_data, dtype=onnx.mapping.TENSOR_TYPE_TO_NP_TYPE[weight.qType]
).reshape(weight.initializer.dims)
packed_weight_initializer = onnx.numpy_helper.from_array(packed_weight_np_data, packed_weight_name)
if not self.add_qdq_pair_to_weight or self.mode != "qdq":
self.model.initializer().append(packed_weight_initializer)
if weight.axis is not None:
zero_scale_shape = [weight.initializer.dims[weight.axis]]
else: # scale and zero point must be scalar
.

It is deprecated. Use helper.tensor_dtype_to_np_dtype instead.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions