About convert.py
typhoonlee opened this issue · comments
What is this file used for? Convolution parameter fusion in the inference stage is not directly read from the training model, but after the training model is converted by convert.py, then inference is performed?
What is this file used for? Convolution parameter fusion in the inference stage is not directly read from the training model, but after the training model is converted by convert.py, then inference is performed?
This file is used for converting ECBSR to a specific frontend for hardware deployment. For example, if you would like to deployt the ECBSR to MNN, you need to convert the pth model to onnx/pb/tflite, then use the toolchain of MNN for the rest steps. Or if you want to quantized the model with tensorflow, you can convert the model to pb-ckpt, then use the tools provided by tensorflow to quantize the model to int8-arithmetic.
Then the model after convert.py is the original training model, and does not use the re-parameter mechanism? So every time I make inferences, I need to perform a re-parameter step,Is that right?
Then the model after convert.py is the original training model, and does not use the re-parameter mechanism? So every time I make inferences, I need to perform a re-parameter step,Is that right?
Not really. The convert.py is used for converting the trained rep-parameterized model into a plain & neat model which is friendly for hardware deployment. One thing to be noted that, the reparameterization mechanism is activated on training mode, and each rep-block are folded back into a normal conv for inference.