I have a trained TensorFlow model that is correctly saved as a pb model to load into .NET and perform inference. The .NET program will build correctly if the target is a 64 bit (x64), but when the platform target is changed to 32 bit (x86), it will throw an exception:
If you google the exception a top result is a stack overflow response from 2019 where the second answer says:
Reason 1: Microsoft.ML works on x64 only
which does not look promising. However, earlier that year there was an article in devblogs.microsoft where a little more detail is given on the supported architecture:
- x64 bit is supported on all platforms.
- x86 is supported on Windows, except for TensorFlow, LightGBM, and ONNX related functionality.
Another article in devblogs.microsoft by the same author later in the year says:
ML.NET uses C++ code that is hard-coded to x86-based SSE instructions.
This sounds more promising since TensorFlow easily transfers into C++.
Since all of these were written almost 3 years ago, and there was support for x86 just not yet for Tensorflow and it is built using C++ per the third article, has anything changed at all? I tried looking through the Microsoft.ML and didn't find anything. I also haven't found a more recent article on the discussion. Is there a different way that I can save the TensorFlow model to make it work on x86 in .NET? Is the support for TensorFlow in C# on x86 now available? What are possible workarounds?