您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
22 行
691 B
22 行
691 B
using NUnit.Framework;
|
|
using Unity.MLAgents.Sensors;
|
|
|
|
namespace Unity.MLAgents.Tests
|
|
{
|
|
public static class SensorTestHelper
|
|
{
|
|
public static void CompareObservation(ISensor sensor, float[] expected)
|
|
{
|
|
string errorMessage;
|
|
bool isOK = SensorHelper.CompareObservation(sensor, expected, out errorMessage);
|
|
Assert.IsTrue(isOK, errorMessage);
|
|
}
|
|
|
|
public static void CompareObservation(ISensor sensor, float[,,] expected)
|
|
{
|
|
string errorMessage;
|
|
bool isOK = SensorHelper.CompareObservation(sensor, expected, out errorMessage);
|
|
Assert.IsTrue(isOK, errorMessage);
|
|
}
|
|
}
|
|
}
|