Thank you for the reply. It is a good idea. However, after I dig into it a little bit more, the matter seems a little more complicated than I originally asked for.
The attached openface_server.lua file is the core file to perform inferencing using Torch7. Besides what is already available in the Torch7 iOS module, it requires the "dpnn" module. I was curious what would happen if I ignore the "dpnn" module in the .lua file I attached, then I got below error:
/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/torch/File.lua:343: unknown Torch class <nn.Inception>
stack traceback:
[C]: in function 'error'
/root/torch/install/share/lua/5.1/torch/File.lua:343: in function 'readObject'
/root/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/root/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/root/torch/install/share/lua/5.1/nn/Module.lua:158: in function 'read'
/root/torch/install/share/lua/5.1/torch/File.lua:351: in function 'readObject'
/root/torch/install/share/lua/5.1/torch/File.lua:409: in function 'load'
...lib/python2.7/dist-packages/openface/openface_server.lua:40: in main chunk
[C]: in function 'dofile'
/root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
I think it indicates that the "torch.load()" function in the .lua file cannot load the pre-trained neural network model without "dpnn" module. I took a look at the neural network model, it is saved binary. I suspect it was created by the "dpnn" module. This means that I can go without other modules like "optim" and "cvsigo", but running the "dpnn" module on iOS is a must.
This put me back to my original question, that "how can I make an additional cmake target so that I can compile dpnn module on iOS". There must be a file where the original Torch iOS defined "build targets". But I have a hard time finding it. Do you (or anyone who is an expert) have an idea? Thank you so much!
Nan