xmartlabs / Bender

Easily craft fast Neural Networks on iOS! Use TensorFlow models. Metal under the hood.
https://xmartlabs.github.io/Bender/
MIT License
1.8k stars 90 forks source link

How to use model with 2 input parameters? #86

Closed czater closed 6 years ago

czater commented 6 years ago

I have style transfer model that have 2 input parameters - image and style number. Where can I add style number parameter? In .run there is only place fot image and completionHandler.

czater commented 6 years ago

Anyone?

bryant1410 commented 6 years ago

Unfortunately, this is not currently supported.

This could be worked around with custom layers, but they can only be added in pre or post processing stages. Also changing the Start node with some custom one, but operations cannot return more than one output, so it's useless. Also, there's no way to take only some part of the input in the middle of the net, which would be useful if concatenating the 2 inputs.

As we don't have an ETA for this, what you can do is to fork the library and hardcode the different inputs for the different operations that use them.