直接使用ml_agents包会报下列错误
解决方法:
Edit -> Project Settings -> Player
Configuration属性
Scripting Runtime Version (官方文档是改到.NET 4.6 [4.x难道是个人版问题?])
Scripting Define Symbols ( ENABLE_TENSORFLOW 使用TensorFlow插件)
Training the environment 的时候报错:
TFException: Op type not registered 'ClipByValue' in binary running on ISLAND. Make sure the Op and Kernel are registered in the binary running in this process.
TensorFlow.TFStatus.CheckMaybeRaise (TensorFlow.TFStatus incomingStatus, System.Boolean last) (at <1fe2de69842a4a4ba15256b83cca05f3>:0)
TensorFlow.TFGraph.Import (TensorFlow.TFBuffer graphDef, TensorFlow.TFImportGraphDefOptions options, TensorFlow.TFStatus status) (at <1fe2de69842a4a4ba15256b83cca05f3>:0)
TensorFlow.TFGraph.Import (System.Byte[] buffer, TensorFlow.TFImportGraphDefOptions options, TensorFlow.TFStatus status) (at <1fe2de69842a4a4ba15256b83cca05f3>:0)
TensorFlow.TFGraph.Import (System.Byte[] buffer, System.String prefix, TensorFlow.TFStatus status) (at <1fe2de69842a4a4ba15256b83cca05f3>:0)
MLAgents.CoreBrainInternal.InitializeCoreBrain (MLAgents.Batcher brainBatcher) (at Assets/ML-Agents/Scripts/CoreBrainInternal.cs:132)
MLAgents.Brain.InitializeBrain (MLAgents.Academy aca, MLAgents.Batcher brainBatcher) (at Assets/ML-Agents/Scripts/Brain.cs:211)
MLAgents.Academy.InitializeEnvironment () (at Assets/ML-Agents/Scripts/Academy.cs:288)
MLAgents.Academy.Awake () (at Assets/ML-Agents/Scripts/Academy.cs:227)
Tensorflow版本问题
pip uninstall TensorFlow
pip install TensorFlow==1.4
Reference:
https://github.com/Unity-Technologies/ml-agents/issues/762