Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity package #29

Open
lostmsu opened this issue Jun 9, 2020 · 1 comment
Open

Unity package #29

lostmsu opened this issue Jun 9, 2020 · 1 comment
Milestone

Comments

@lostmsu
Copy link
Contributor

lostmsu commented Jun 9, 2020

Ship a package for Unity

@lostmsu lostmsu added this to the RC0 milestone Jun 9, 2020
@lostmsu lostmsu modified the milestones: RC0, 2.x Jun 23, 2020
@lostmsu
Copy link
Contributor Author

lostmsu commented Jun 23, 2020

Moving this to 2.x for now. Current runtime is unable to survive reload of its assemblies.

Unofficially, you should be able to use TensorFlow in Unity by adding the following .NET Standard 2.0 assemblies from their respective NuGet packages:

Gradient.dll // will be renamed LostTech.TensorFlow.dll by RC0
IndexRange.dll
LostTech.Gradient.dll
LostTech.NumPy.dll
LostTech.WhichPython.dll
Python.Runtime.dll
SharPy.Runtime.dll
System.Buffers.dll
System.Memory.dll
System.Runtime.CompilerServices.Unsafe.dll
System.Security.Permissions.dll

And disabling Domain Reload.

Unfortunately Unity Editor will reload the domain regardless whenever the project is recompiled, after which an attempt to initialize Gradient again will crash the editor with Access Violation/segfault.

Extra hint: using GPU acceleration for TensorFlow requires CUDA and cudnn to be distributed (so an NVidia GPU). Calling tf.test.is_gpu_available() will tell if all components work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant