浏览代码

Release tf#android fix (#1180)

* The Android fix

* additional documentation

* added #
/develop-generalizationTraining-TrainerController
GitHub 6 年前
当前提交
5545a22d
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 2
      UnitySDK/Assets/ML-Agents/Scripts/CoreBrainInternal.cs
  2. 6
      docs/Using-TensorFlow-Sharp-in-Unity.md

2
UnitySDK/Assets/ML-Agents/Scripts/CoreBrainInternal.cs


public void InitializeCoreBrain(MLAgents.Batcher brainBatcher)
{
#if ENABLE_TENSORFLOW
#if UNITY_ANDROID
#if UNITY_ANDROID && !UNITY_EDITOR
// This needs to ba called only once and will raise an exception if
// there are multiple internal brains
try{

6
docs/Using-TensorFlow-Sharp-in-Unity.md


## iOS additional instructions for building
* Before build your game against iOS platform, make sure you've set the
flag `ENABLE_TENSORFLOW` for it.
* Once you build the project for iOS in the editor, open the .xcodeproj file
within the project folder using Xcode.
* Set up your ios account following the

TensorFlow's `freeze_graph.py`. The process to create such graph is explained in
the [Using your own trained graphs](#using-your-own-trained-graphs) section.
## Inside of Unity
### Inside of Unity
To load and use a TensorFlow data graph in Unity:

your code :
```csharp
#if UNITY_ANDROID
#if UNITY_ANDROID && !UNITY_EDITOR
TensorFlowSharp.Android.NativeBinding.Init();
#endif
```

正在加载...
取消
保存