Download com.unity.ml-agents.tests/Tests/Runtime/Sensor/SensorTestHelper.cs from ashish2244/ppo-SnowballTarget: direct link, hf CLI and curl.
- Browser
- Download file 691 Bytes
-
https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents.tests/Tests/Runtime/Sensor/SensorTestHelper.cs
- Command line
-
hf download hf://ashish2244/ppo-SnowballTarget/com.unity.ml-agents.tests/Tests/Runtime/Sensor/SensorTestHelper.cs
-
curl -L -o SensorTestHelper.cs https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents.tests/Tests/Runtime/Sensor/SensorTestHelper.cs
691 Bytes
| 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); | |
| } | |
| } | |
| } | |