It seems that in order to fully use TensorFlow and associated libraries I need to access it from Python. Utilizing TensorFlow requires building rather complicated graphs which Python helper libraries (e.g. Keras) automate in sophisticated ways. I don't see a way to do that directly from .NET. See for example the respective GitHub discussion about C# support.
My idea is this: The main C# application will call into a Python application to access TensorFlow. That way most code will remain in C# land. I can use CPython which has full support for everything (IronPython does not).
How would I go about "calling into a Python application"? I assume I will need to run python.exe
in a child process and make it execute commands. The child process will need to remain running between commands so that I can keep/share objects and data.
How would I best go about doing this? I don't quite know where to start.
Have a look on this: https://github.com/migueldeicaza/TensorFlowSharp
TensorFlowSharp are .NET bindings to the TensorFlow library. This surfaces the C API as a strongly-typed .NET API for use from C# and F#.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With