浏览代码

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

/release_1_branch
GitHub 5 年前
当前提交
731fb88b
共有 28 个文件被更改,包括 36 次插入35 次删除
  1. 2
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
  2. 2
      Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs
  3. 1
      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 Unity.MLAgents;
using Unity.MLAgents.Policies;

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


using System.Collections;
using UnityEngine;
using Unity.MLAgents;
using Barracuda;
using Unity.Barracuda;
using Unity.MLAgents.Sensors;
public class WallJumpAgent : Agent

1
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)
- Updated to Barracuda 0.7.0-preivew which has breaking namespace and assembly name changes.
#### ml-agents / ml-agents-envs / gym-unity (Python)
- The `--load` and `--train` command-line flags have been deprecated. Training
now happens by default, and use `--resume` to resume training instead. (#3705)

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


using Unity.MLAgents.Sensors;
using UnityEditor;
using Barracuda;
using Unity.Barracuda;
using UnityEngine;
namespace Unity.MLAgents.Editor

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 Unity.MLAgents.Inference;
using Unity.MLAgents.Policies;
using Unity.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 UnityEngine.Serialization;
namespace Unity.MLAgents

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


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

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


using System;
using System.Collections.Generic;
using System.Linq;
using Barracuda;
using Unity.Barracuda;
namespace Unity.MLAgents.Inference
{

"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 UnityEngine;
using Unity.MLAgents.Sensors;

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


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

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


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

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


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

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


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

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


using Barracuda;
using Unity.Barracuda;
using System.Collections.Generic;
using Unity.MLAgents.Inference;
using Unity.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;
namespace Unity.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 Unity.MLAgents.Inference;

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


using System.Collections.Generic;
using NUnit.Framework;
using Barracuda;
using Unity.Barracuda;
namespace Unity.MLAgents.Tests
{

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


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

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


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

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


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

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


using NUnit.Framework;
using Unity.MLAgents.Sensors;
using Barracuda;
using Unity.Barracuda;
namespace Unity.MLAgents.Tests

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


using System;
using Barracuda;
using Unity.Barracuda;
using NUnit.Framework;
namespace Unity.MLAgents.Tests

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"
}
}
正在加载...
取消
保存