ONE
ONE copied to clipboard
[Compiler FE] Convert dynamic batch to single batch
What
Let's implement an option to convert a model with a dynamic batch size to a model with a single batch.
For example,
onecc optimize --dynamic_batch_to_single_batch -i dynamic.circle -o single.circle
Why
The option will
- enable quantization of the model
- allow the model to be run on backends that do not support dynamic shapes
dynamic batch size: where shape of input is like (-1, 224, 244, 3) where -1 is unknown(dynamic) batch size.
More specifically, shape_signature is like (-1, 224, 224, 3). The below case is possible
shape: (1, 224, 224, 3) shape_signature: (-1, 224, 224, 3)