浏览代码

[barracuda] Update Barracuda to 0.7.0-preview. (#3873)

/develop/dockerfile
GitHub 5 年前
当前提交
c7722f73
共有 28 个文件被更改,包括 36 次插入36 次删除
  1. 2
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
  2. 2
      Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs
  3. 2
      com.unity.ml-agents/CHANGELOG.md
  4. 2
      com.unity.ml-agents/Editor/BehaviorParametersEditor.cs
  5. 4
      com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef
  6. 2
      com.unity.ml-agents/Runtime/Academy.cs
  7. 2
      com.unity.ml-agents/Runtime/Agent.cs
  8. 2
      com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs
  9. 10
      com.unity.ml-agents/Runtime/Inference/BarracudaModelParamLoader.cs
  10. 2
      com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs
  11. 2
      com.unity.ml-agents/Runtime/Inference/ModelRunner.cs
  12. 2
      com.unity.ml-agents/Runtime/Inference/TensorApplier.cs
  13. 2
      com.unity.ml-agents/Runtime/Inference/TensorGenerator.cs
  14. 2
      com.unity.ml-agents/Runtime/Inference/TensorProxy.cs
  15. 2
      com.unity.ml-agents/Runtime/Policies/BarracudaPolicy.cs
  16. 2
      com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs
  17. 2
      com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs
  18. 4
      com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef
  19. 2
      com.unity.ml-agents/Tests/Editor/DiscreteActionOutputApplierTest.cs
  20. 2
      com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorApplier.cs
  21. 2
      com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorGenerator.cs
  22. 2
      com.unity.ml-agents/Tests/Editor/ModelRunnerTest.cs
  23. 2
      com.unity.ml-agents/Tests/Editor/ParameterLoaderTest.cs
  24. 2
      com.unity.ml-agents/Tests/Editor/Sensor/ObservationWriterTests.cs
  25. 2
      com.unity.ml-agents/Tests/Editor/TensorUtilsTest.cs
  26. 4
      com.unity.ml-agents/Tests/Editor/Unity.ML-Agents.Editor.Tests.asmdef
  27. 2
      com.unity.ml-agents/Tests/Runtime/Unity.ML-Agents.Runtime.Tests.asmdef
  28. 4
      com.unity.ml-agents/package.json

2
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs


using System;
using System.Collections.Generic;
using UnityEngine;
using Barracuda;
using Unity.Barracuda;
using System.IO;
using MLAgents;
using MLAgents.Policies;

2
Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs


using System.Collections;
using UnityEngine;
using MLAgents;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Sensors;
using MLAgents.SideChannels;

2
com.unity.ml-agents/CHANGELOG.md


C# style conventions. All public fields and properties now use "PascalCase"
instead of "camelCase"; for example, `Agent.maxStep` was renamed to
`Agent.MaxStep`. For a full list of changes, see the pull request. (#3828)
- Update Barracuda to 0.7.0-preview which has breaking namespace and assembly name changes.
### Minor Changes

- `StackingSensor` was changed from `internal` visibility to `public`
- Academy.InferenceSeed property was added. This is used to initialize the
random number generator in ModelRunner, and is incremented for each ModelRunner. (#3823)
- Updated Barracuda to 0.6.3-preview.
- Added `Agent.GetObservations(), which returns a read-only view of the observations
added in `CollectObservations()`. (#3825)
- Model updates can now happen asynchronously with environment steps for better performance. (#3690)

2
com.unity.ml-agents/Editor/BehaviorParametersEditor.cs


using MLAgents.Sensors;
using UnityEditor;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Policies;
using UnityEngine;

4
com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef


"name": "Unity.ML-Agents.Editor",
"references": [
"Unity.ML-Agents",
"Barracuda",
"Unity.Barracuda",
"Unity.ML-Agents.CommunicatorObjects"
],
"optionalUnityReferences": [],

"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}
}

2
com.unity.ml-agents/Runtime/Academy.cs


using MLAgents.Inference;
using MLAgents.Policies;
using MLAgents.SideChannels;
using Barracuda;
using Unity.Barracuda;
/**
* Welcome to Unity Machine Learning Agents (ML-Agents).

2
com.unity.ml-agents/Runtime/Agent.cs


using System.Collections.Generic;
using System.Collections.ObjectModel;
using UnityEngine;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Sensors;
using MLAgents.Demonstrations;
using MLAgents.Policies;

2
com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Inference.Utils;
using UnityEngine;

10
com.unity.ml-agents/Runtime/Inference/BarracudaModelParamLoader.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Sensors;
using MLAgents.Policies;

"suggest Continuous Control.");
return failedModelChecks;
}
var tensorTester = new Dictionary<string, Func<BrainParameters, TensorShape, int, string>>();
var tensorTester = new Dictionary<string, Func<BrainParameters, TensorShape?, int, string>>();
if (brainParameters.VectorActionSpaceType == SpaceType.Continuous)
{
tensorTester[TensorNames.ActionOutput] = CheckContinuousActionOutputShape;

{
if (tensorTester.ContainsKey(name))
{
var tester = tensorTester[name];
Func<BrainParameters, TensorShape?, int, string> tester = tensorTester[name];
var error = tester.Invoke(brainParameters, model.GetShapeByName(name), modelActionSize);
if (error != null)
{

/// check failed. If the check passed, returns null.
/// </returns>
static string CheckDiscreteActionOutputShape(
BrainParameters brainParameters, TensorShape shape, int modelActionSize)
BrainParameters brainParameters, TensorShape? shape, int modelActionSize)
{
var bpActionSize = brainParameters.VectorActionSize.Sum();
if (modelActionSize != bpActionSize)

/// <returns>If the Check failed, returns a string containing information about why the
/// check failed. If the check passed, returns null.</returns>
static string CheckContinuousActionOutputShape(
BrainParameters brainParameters, TensorShape shape, int modelActionSize)
BrainParameters brainParameters, TensorShape? shape, int modelActionSize)
{
var bpActionSize = brainParameters.VectorActionSize[0];
if (modelActionSize != bpActionSize)

2
com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs


using System.Collections.Generic;
using System;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Inference.Utils;
using UnityEngine;
using MLAgents.Sensors;

2
com.unity.ml-agents/Runtime/Inference/ModelRunner.cs


using System.Collections.Generic;
using Barracuda;
using Unity.Barracuda;
using UnityEngine.Profiling;
using MLAgents.Sensors;
using MLAgents.Policies;

2
com.unity.ml-agents/Runtime/Inference/TensorApplier.cs


using System.Collections.Generic;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Policies;
namespace MLAgents.Inference

2
com.unity.ml-agents/Runtime/Inference/TensorGenerator.cs


using System.Collections.Generic;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Sensors;
namespace MLAgents.Inference

2
com.unity.ml-agents/Runtime/Inference/TensorProxy.cs


using System;
using System.Collections.Generic;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Inference.Utils;
namespace MLAgents.Inference

2
com.unity.ml-agents/Runtime/Policies/BarracudaPolicy.cs


using Barracuda;
using Unity.Barracuda;
using System.Collections.Generic;
using MLAgents.Inference;
using MLAgents.Sensors;

2
com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs


using Barracuda;
using Unity.Barracuda;
using System;
using UnityEngine;
using UnityEngine.Serialization;

2
com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs


using System;
using System.Collections.Generic;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Inference;
namespace MLAgents.Sensors

4
com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef


{
"name": "Unity.ML-Agents",
"references": [
"Barracuda",
"Unity.Barracuda",
"Unity.ML-Agents.CommunicatorObjects"
],
"optionalUnityReferences": [],

],
"autoReferenced": true,
"defineConstraints": []
}
}

2
com.unity.ml-agents/Tests/Editor/DiscreteActionOutputApplierTest.cs


using System;
using Barracuda;
using Unity.Barracuda;
using NUnit.Framework;
using UnityEngine;
using MLAgents.Inference;

2
com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorApplier.cs


using System.Collections.Generic;
using NUnit.Framework;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Inference;
using MLAgents.Policies;

2
com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorGenerator.cs


using System.Collections.Generic;
using Barracuda;
using Unity.Barracuda;
using NUnit.Framework;
using UnityEngine;
using MLAgents.Inference;

2
com.unity.ml-agents/Tests/Editor/ModelRunnerTest.cs


using NUnit.Framework;
using UnityEngine;
using UnityEditor;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Inference;
using MLAgents.Sensors;
using System.Linq;

2
com.unity.ml-agents/Tests/Editor/ParameterLoaderTest.cs


using NUnit.Framework;
using UnityEngine;
using UnityEditor;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Inference;
using MLAgents.Sensors;
using System.Linq;

2
com.unity.ml-agents/Tests/Editor/Sensor/ObservationWriterTests.cs


using NUnit.Framework;
using MLAgents.Sensors;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Inference;

2
com.unity.ml-agents/Tests/Editor/TensorUtilsTest.cs


using System;
using Barracuda;
using Unity.Barracuda;
using MLAgents.Inference;
using MLAgents.Inference.Utils;
using NUnit.Framework;

4
com.unity.ml-agents/Tests/Editor/Unity.ML-Agents.Editor.Tests.asmdef


"references": [
"Unity.ML-Agents.Editor",
"Unity.ML-Agents",
"Barracuda",
"Unity.Barracuda",
"Unity.ML-Agents.CommunicatorObjects"
],
"optionalUnityReferences": [

"defineConstraints": [
"UNITY_INCLUDE_TESTS"
]
}
}

2
com.unity.ml-agents/Tests/Runtime/Unity.ML-Agents.Runtime.Tests.asmdef


"name": "Tests",
"references": [
"Unity.ML-Agents",
"Barracuda",
"Unity.Barracuda",
"Unity.ML-Agents.CommunicatorObjects",
"Unity.ML-Agents.Editor"
],

4
com.unity.ml-agents/package.json


"unity": "2018.4",
"description": "Add interactivity to your game with Machine Learning Agents trained using Deep Reinforcement Learning.",
"dependencies": {
"com.unity.barracuda": "0.6.3-preview"
"com.unity.barracuda": "0.7.0-preview"
}
}
正在加载...
取消
保存