How to use the Generated Bundle

With the command model-compiler -backend=CPU -model=<model-path> -emit-bundle=<bundle-dir> , Bundle is generated for the model resnet18.onnx.
As said here I want to use that generated bundle and give a image as input and classify to what class that image belongs to.
I realize i have to write my own code for it and fed the input to it… something like that…So… Can you please tell me how to do it.

There is a section on the README for how to use a bundle here. Additionally there are some examples located here.

There is a main.cpp in resnet50.cpp and four files are generated in the bundle .h .bin .o .txt
Now how should the command look like to run it? I tried like this and got such error…

There’s a makefile, you can follow it or use it to compile for you (or see the commands it uses): glow/CMakeLists.txt at master · pytorch/glow · GitHub

It is working fine when i directly take the .h .o .bin files which are generated by GLOW itself in here but when i generated explicitly(.h .o .bin files) by using the commands as provided here, it isn’t working when i create the executable. The files generated are also not same. How are the bundle files generated by GLOW in the first case,which Model is used to generate it…?

The models are e.g. resnet50 we have available in our AWS bin for public testing. If you are having issues specific to the model-compiler I’d suggest filing an issue on the Glow Github page and tagging mciprian13 who is its main contributor.

I changed the model then it worked. It is for caffe2 resnet50 model .Earlier i was trying for resnet50 onnx model so thats why it didn’t work.