From f9027b9bc9c54cb6e36a4a6f70adcd249c4db725 Mon Sep 17 00:00:00 2001 From: Ruo-Ping Dong Date: Thu, 8 Oct 2020 17:34:16 -0700 Subject: [PATCH] add method summaries --- com.unity.ml-agents/Runtime/SensorHelper.cs | 10 ++++++++++ com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/com.unity.ml-agents/Runtime/SensorHelper.cs b/com.unity.ml-agents/Runtime/SensorHelper.cs index 5870d0789a..d3b406a1ef 100644 --- a/com.unity.ml-agents/Runtime/SensorHelper.cs +++ b/com.unity.ml-agents/Runtime/SensorHelper.cs @@ -64,6 +64,16 @@ public static bool CompareObservation(ISensor sensor, float[] expected, out stri return true; } + /// + /// Generates the observations for the provided sensor, and returns true if they equal the + /// expected values. If they are unequal, errorMessage is also set. + /// This should not generally be used in production code. It is only intended for + /// simplifying unit tests. + /// + /// + /// + /// + /// public static bool CompareObservation(ISensor sensor, float[,,] expected, out string errorMessage) { var tensorShape = new TensorShape(0, expected.GetLength(0), expected.GetLength(1), expected.GetLength(2)); diff --git a/com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs b/com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs index 6064a758dd..92f21252b7 100644 --- a/com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs +++ b/com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs @@ -202,6 +202,7 @@ public byte[] GetCompressedObservation() return outputBytes; } + /// public int[] GetCompressedChannelMapping() { return m_CompressionMapping; @@ -224,7 +225,6 @@ internal byte[] CreateEmptyPNG() return texture2D.EncodeToPNG(); } - /// /// Constrct stacked CompressedChannelMapping. ///