ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

Tensorflow.NET integration

Open flo-wolf opened this issue 5 years ago • 2 comments

Is your feature request related to a problem? Please describe. I am unable to train agents during runtime inside my builds, due to the python dependency. Currently ml-agents is Editor only.

Describe the solution you'd like Tensorflow.NET integration, creating full C# training support, allowing for runtime (live) training in builds.

Describe alternatives you've considered Bundling python into the build, which is very convoluted and creates a unnessessarily complex pipeline, which .NET integration would prevent.

Additional context Since Tensorflow.NET mimics all the possibilities you get from the python tensorflow, there would be no drawbacks in terms of features. Tensorflow.NET even includes its own version of NumPy fully translated into C#. I don't understand why this isn't considered. If it's possible to stick with only C#, why not go for it?

flo-wolf avatar Jul 02 '20 12:07 flo-wolf

@flo-wolf you can try LostTech.TensorFlow that I just released. We have a ML Agents demo.

However, TensorFlow does not do well with AppDomain unloading and reloading, that Unity editor uses extensively. So you can use it in your game, but trying to use it in the editor will simply crash the editor. The demo I mentioned connects to the editor from outside - that works fine, and, honestly, easier to set up, since you can use NuGet to reference the necessary packages.

lostmsu avatar Aug 28 '20 05:08 lostmsu

Any progress on this?

trsh avatar Oct 29 '21 05:10 trsh

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Nov 04 '22 20:11 github-actions[bot]