ONEforALL-S003 / ONE

On-device Neural Engine / q-implant
Other
1 stars 2 forks source link

[q-implant] PyTorch Quantization Parameter exporter #2

Open ssafyWooJeong opened 1 year ago

ssafyWooJeong commented 1 year ago

What

Let's develop PyTorch Quantization Parameter exporter, a tool to export quantization parameters generated by PyTorch, to be used by q-implant.

Why

Tasks

Usage

TorchQParamExporter.export(original_model, quantized_model, sample_input, json_path, tflite2circle_path)

Calling TorchQParamExporter export method with PyTorch original model(not quantized), PyTorch Quantized model, sample input of network, json(qparam.json) save path and tflite2cirlce module's path

The above method will generate quantization parameters by qparam.json and numpy files. The generated files will be used by q-implant

Notes

It uses tflite2circle and pics to make name mapping between PyTorch and Circle.

Judgement9882 commented 1 year ago

What에다가 관련된 이슈의 # 번호 붙이면 좋을것같아요!