Deploying the model on the Arduino Nano
Now that we have acquired the knowledge of code generation with TVM, we are prepared to shift our attention toward deploying an actual model on physical microcontrollers.
Thus, in this recipe, we aim to deploy the quantized CIFAR-10 model on the Arduino Nano.
Getting ready
To get ready with this recipe, we need to know how to generate and structure an Arduino project.
In the previous recipe, we executed the CIFAR-10 model on the host machine through the Python host-driven interface. However, we haven’t seen any actual code generated apart from a few Python objects returned by TVM.
As mentioned earlier, when dealing with microcontrollers, the output of TVM is a TAR package that contains the C code for the TVM runtime and TVM Lib, known as MLF. The TAR file is created when we call the tvm.micro.generate_project()
function and is automatically decompressed, integrating only the necessary files into the target template...